0

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!

SCA
  • 1
  • 1

1 Answers1

0
  1. You can create dynamic SQL through script files. Massive does exactly what you're intending internally when you create document tables.

  2. 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