upper / db

Data Access Layer (DAL) for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.
https://upper.io/
MIT License
3.53k stars 234 forks source link

Is it possible to add a unified table prefix setting #623

Open OneSeven opened 3 years ago

OneSeven commented 3 years ago

When designing the data table, we added the table name prefix (a_table, b_table, c_table,...) to each table name It may be that multiple projects share a database, or other reasons, This can make implementation more flexible

Can add the following settings to increase the table preset

sess.prefix()

Set a table prefix separately when querying or inserting

db.prefix().select()