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 compatibility for nim 2.0 #20

Open
PhilippMDoerner opened this issue Dec 23, 2022 · 0 comments
Open

Add compatibility for nim 2.0 #20

PhilippMDoerner opened this issue Dec 23, 2022 · 0 comments

Comments

@PhilippMDoerner
Copy link
Contributor

PhilippMDoerner commented Dec 23, 2022

With nim 2.0 the packages std/db_sqlite/db_postgres/db_mysql are no longer part of the standard library!

They have been moved into its own package called dbconnector.

It should be as simple as swapping out the imports:

  • std/sqlite3 => db_connector/sqlite3
  • std/db_common => db_connector/db_common

(I don't think I've seen any usage of std/db_postgres or std/postgres so those appear to be not necessary to swap out).

This might be a breaking change, as I'm not sure if db_connector can be used in nim 1.0 versions.

I can confirm for db_sqlite that it works flawlessly with the following 2 changes:

  • in sqlite.nim line 83 to import db_connector/db_common
  • in sqlite3.nim line 18 to import db_connector/sqlite3

I can't say anything about postgres at this time because I can't even get the tests to run under nim 1.6.10

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

No branches or pull requests

1 participant