WITH existingUser AS (SELECT * FROM user WHERE isRemoved = 0);
Elka
05/15/2020, 4:32 PM
@alec Starting new with SqlDelight and Sqlite in general. I have a couple of questions:
• Do we have something documented on where we can find some advanced usages of the APIs?
• I am trying to see if
WITH
would allow me to not repeat myself in other queries. I tried to write this statement
Copy code
WITH existingUser AS (SELECT * FROM user WHERE isRemoved = 0);
So I can later create a query like this:
Copy code
selectByName:
SELECT * FROM existingUser WHERE name = ?;
The query selectByName would return me all the users that were not removed and verifying the condition