I have setup a postgreSQL access through a node server using express and massive, but I cannot find a way to build new tables with dynamic table names or select a table dynamically using massive. Any direction would be most appreciated!
Asked
Active
Viewed 102 times
1 Answers
0
You can create dynamic SQL through script files. Massive does exactly what you're intending internally when you create document tables.
Tables (and other database objects) are properties on the
db
object so you can use bracket accessor syntax with a variable, viz.await db[thisOrThatTableName].find(...)
.

dmfay
- 2,417
- 1
- 11
- 22