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

Add DB2 Dialect #3131

Closed
hfhbd opened this issue Apr 22, 2022 · 8 comments
Closed

Add DB2 Dialect #3131

hfhbd opened this issue Apr 22, 2022 · 8 comments
Labels

Comments

@hfhbd
Copy link
Collaborator

hfhbd commented Apr 22, 2022

Description

I want to use DB2 sql server from Kotlin (JVM). A similar feature request exists for Exposed (JetBrains/Exposed#930)

https://www.testcontainers.org/modules/databases/db2/ supports db2 as well.

I would start to implement it, if you want to have this dialect here.

@hfhbd hfhbd added the feature label Apr 22, 2022
@AlecKazakova
Copy link
Collaborator

with the dialect api this doesn't need to live in sqldelight, and other dialects will probably move out at some point. If someone else builds a dialect for db2 I'm happy to link to it in the docs but I won't be adding more dialects myself

@hfhbd
Copy link
Collaborator Author

hfhbd commented Apr 22, 2022

I agree. So with the new dialect module, it is possible to use 3rd party dialects? Nice!

@AlecKazakova
Copy link
Collaborator

yes!

@dudil
Copy link

dudil commented Jul 8, 2022

with the dialect api this doesn't need to live in sqldelight, and other dialects will probably move out at some point. If someone else builds a dialect for db2 I'm happy to link to it in the docs but I won't be adding more dialects myself

Hi @AlecStrong , @hfhbd were you able to add the the dialect? Is there another project currently running for it?

@hfhbd
Copy link
Collaborator Author

hfhbd commented Jul 8, 2022

It is indeed on my (big) backlog :D
I definitely need it later this year. If you need it too, I could start prototype it in the next days, and any contributions are welcome!

@dudil
Copy link

dudil commented Jul 8, 2022

Absolutely yes! 🙏
Would be happy to work on that with you

@hfhbd
Copy link
Collaborator Author

hfhbd commented Jul 12, 2022

@dudil I created an initial dialect. I will add features/missing dialects on demand. As I don't use the dialect yet, feel free to create issues, and PRs :)
I will publish a initial release soon.
https://github.com/hfhbd/sqldelight-db2-dialect

@hfhbd
Copy link
Collaborator Author

hfhbd commented Aug 22, 2022

@dudil I released an initial version:

sqldelight {
    database("DB") {
        dialect("app.softwork:sqldelight-db2-dialect:0.0.1")
    }
}

It should work, but I depend on a snapshot version of sqldelight, so you have to use id("app.cash.sqldelight") version "2.0.0-SNAPSHOT" too.

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

No branches or pull requests

3 participants