tusken icon indicating copy to clipboard operation
tusken copied to clipboard

Multiple databases with one client

Open aleclarson opened this issue 3 years ago • 0 comments

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.

aleclarson avatar Sep 17 '22 17:09 aleclarson