Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Multiple databases with one client #35

Open
aleclarson opened this issue Sep 17, 2022 · 0 comments
Open

Multiple databases with one client #35

aleclarson opened this issue Sep 17, 2022 · 0 comments
Labels
enhancement New feature or request priority: low Might be a while unless a contributor comes

Comments

@aleclarson
Copy link
Contributor

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 aleclarson added enhancement New feature or request priority: low Might be a while unless a contributor comes labels Sep 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request priority: low Might be a while unless a contributor comes
Projects
None yet
Development

No branches or pull requests

1 participant