How to type tables with dynamic names?
The MS SQL dialect only supports global temporary objects, that forces us to add random table suffix to prevent collisions between sessions.
Is it possible to type the table contents as a second query?
Conceptually my code runs like this:
My current road blocks:
1.
2. A raw SQL approach via
Is it possible to type the table contents as a second query?
Conceptually my code runs like this:
My current road blocks:
1.
.withTables() does not accept object type with dynamic keys [tableName] where it shows this error A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.,2. A raw SQL approach via
sql literal does not provide a .stream() method.Solution
Hey 
A workaround would be to use the same table name in
A workaround would be to use the same table name in
.withTables and in the queries, and implement a plugin that on-the-fly adds the random suffix to all references to that table.