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

Always generate the database interface and its impl #3518

Closed
hfhbd opened this issue Sep 20, 2022 · 0 comments · Fixed by #3540
Closed

Always generate the database interface and its impl #3518

hfhbd opened this issue Sep 20, 2022 · 0 comments · Fixed by #3540
Labels

Comments

@hfhbd
Copy link
Collaborator

hfhbd commented Sep 20, 2022

SQLDelight Version

2.0.0-alpha03

Operating System

macOS 13

Gradle Version

7.5.1

Kotlin Version

1.7.10

Dialect

PostgreSQL

AGP Version

No response

Describe the Bug

At the moment sqlDelight does not generate the database interface and its implementation if there are no queries. This makes sense if you define your tables in your query files.
But you could also create the tables in your migration files.
Depending on the use case, you don't need a query file:

  • You only need the schema generated by sqldelight, but use other frameworks/raw queries to use it
  • You define the schema in one shared module and use dependency in another module which contains the real queries

Reproducer for second use case:
shared-sqm-files-sample.zip

Stacktrace

No response

Gradle Build Script

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant