-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Different API to node-sqlite3 #113
Comments
The current API is inspired from Node.js It's a pretty simple and synchronous API that allows making best of sqlite3 performance. I see that node-sqlite3 is callback based & non-blocking/asynchronous, which could be a bottleneck. So I think a separate wrapper is a preferable option, since the current API seems better in terms of simplicity and performance (see https://www.npmjs.com/package/better-sqlite3 for some performance comparison, and this module performs even better than better-sqlite3). Currently, the high performance sqlite3 bindings in Node.js (better-sqlite3), Deno (sqlite3) and Bun (bun:sqlite) ecosystems all have this similar API. |
@DjDeveloperr Thanks for the answer, that is very good to know that the API is based on There are also drivers in TypeORM for better-sqlite3, so maybe I should just output this package as Edit: |
@JumpLink Using better-sqlite3 driver sounds like a great idea. I can try to help get that to work. There shouldn't be much big differences, which one are you running into here? |
@DjDeveloperr I can create a simple example for this issue, than other developers like you can test it by himself |
@DjDeveloperr Here the example: https://github.com/JumpLink/deno-typeorm-sqlite-example with preconfigured settings for debugging Deno and Node.js in VSCode. |
I tried to use this package under Deno with TypeORM which did not work because they differ in API's to node-sqlite3.
Is it an option for you to make the APIs more compatible and would you accept PRs for this?
I also wrote a simple wrapper that makes the API's more compatible. So far I have only tried this with a very simple TypeORM entry, but at least that worked. Maybe this is also useful for someone else.
The text was updated successfully, but these errors were encountered: