tusken
tusken copied to clipboard
Multiple databases with one client
If only one database is configured by tusken.config.ts, the current behavior is kept.
db.select(t.user)
If multiple databases are configured like…
export default defineConfig({
database: ['foo', 'bar'],
})
…then it works like this:
db.foo.select(t.foo.user)
db.bar.select(t.bar.user)
The t.foo.user could be shortened to t.user if and only if db.bar has no user table.