Comments (5)
The current API is inspired from Node.js better-sqlite3
module, as a result of rewrite that took place a while ago: #44
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.
from sqlite3.
@DjDeveloperr Thanks for the answer, that is very good to know that the API is based on better-sqlite3
!
There are also drivers in TypeORM for better-sqlite3, so maybe I should just output this package as better-sqlite3
, if that would work I could have saved myself the wrapper 😅. Do you think there are still big differences regarding better-sqlite3
?
Edit:
Okay, I tested it once, there seem to be some differences in the return values, so that would also need adjustments, the question is which is more complex...
from sqlite3.
@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?
from sqlite3.
@DjDeveloperr I can create a simple example for this issue, than other developers like you can test it by himself
from sqlite3.
@DjDeveloperr Here the example: https://github.com/JumpLink/deno-typeorm-sqlite-example with preconfigured settings for debugging Deno and Node.js in VSCode.
from sqlite3.
Related Issues (20)
- SQL statement not support chinese ? HOT 1
- Running in a Web Worker HOT 6
- Error: Failed to load SQLite3 Dynamic Library HOT 3
- Permission denied when trying to only allow access to a certain ffi path HOT 1
- Error: no such table: fsdir HOT 3
- Compiled binary throws zlib dependency error HOT 10
- SQLITE_ENABLE_UPDATE_DELETE_LIMIT does not work on Linux HOT 2
- Allow configuring libsqlite location HOT 2
- bump sqlite bundled version to 3.45 HOT 1
- Extensions and Callbacks prevent using this library with macOS bundled dylib HOT 6
- "TypeError: Invalid ArrayBuffer pointer, pointer is null" while reading blob column HOT 8
- Standardize SQL database interface for TS/JS HOT 1
- `new Database()` in Web Worker freezing HOT 4
- How to do WHERE col in (:array) ?
- How do I update the database? HOT 9
- Question: How to use array parameters, OR alternative? HOT 2
- jsr can avoid native binary downloads HOT 1
- Change the Default Value for `int64` to `true` HOT 2
- got TS2344 [ERROR]: Type does not satisfy the constraint 'Record<string, unknown>' using stmt.get
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlite3.