SELECT 'value'
Is there some way to model
SELECT 'value'
without a table in drizzle?
Specifically I'm trying to do something like
but couldn't find a way to create the SELECT for unionAll
I can of course create it as a raw query and handle the types myself
5 Replies
In union/unionAll you have to pass a query with the same selected fields as the left side.
So query.unionAll(db.select({value:xxx}).from(xx))
That's what I gathered. In this case I have some literal values instead of a table to select from though
The SQL statement above is a small part of a more complex statement, but essentially the idea is to provide a fallback row from code if no rows were previously found
Drizzle Run
Drizzle Run
I think this should be a decent enough summary
really cool tool btw