Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple schemas support #3386

Open
victor-mitcov opened this issue May 16, 2024 · 0 comments
Open

Multiple schemas support #3386

victor-mitcov opened this issue May 16, 2024 · 0 comments
Labels
enhancement New feature or request triage New issues that hasn't been reviewed

Comments

@victor-mitcov
Copy link

victor-mitcov commented May 16, 2024

I'm using mysql with the following configuration:

version: "2"
sql:
  - engine: "mysql"
    schema: "some-path/schemas"
    queries: "some-path/queries"
    gen:
      go:
        out: "some-path/tables"
        package: "internal"

I'd like to be able to compile to code queries, which contain cross schema joining.
Smth like this: SELECT * from db1.users join db2.posts on db1.users.id = db2.posts.id

Now if I try to prefix table names with the schema name in my schema.sql, I'm getting such errors "schema "db2" does not exist".
I'd like to have a way to demonstrate to SQLC which schemas I have and which tables does each of them contain.

What database engines need to be changed?

MySQL

What programming language backends need to be changed?

Go

@victor-mitcov victor-mitcov added enhancement New feature or request triage New issues that hasn't been reviewed labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage New issues that hasn't been reviewed
Projects
None yet
Development

No branches or pull requests

1 participant