Is there a way to group multiple queries together ...
# squarelibraries
s
Is there a way to group multiple queries together as a
Query
in SQLDelight at runtime? I'm trying to add a list of values to a temp table before the query is run. The query is then used in a paging source, so it needs to be a
Query
.
a
yes:
Copy code
myQuery {
  INSERT INTO myTable...
  SELECT * FROM myTable...
}
instead of
myQuery:
s
Is it possible to insert an arbitrarily-sized list like that?
a
should be fine
Copy code
myQuery {
  INSERT INTO myTable VALUES ?;
  SELECT * FROM myTable;
}
s
I didn't know that. Thanks!
Table parameters are not usable in a grouped statement.
a
oh, neat
theres probably a good reason for that but i cant recall right now
s
I guess it's pretty hard to generate because the following statement also takes some parameters?