Commit cb4207e
feat(ext/node): add sqlite-type symbol for DatabaseSync (#30511)
Related:
nodejs/node@d1eabcb
Related: nodejs/node#59405
Related: better-auth/better-auth#3869
Related: oven-sh/bun#22109
Nowadays, there are tons of database packages, like sqlite3, sqlite,
better-sqlite, bun:sqlite... Checking the difference from them is pretty
hard.
instanceof is not good, since the developer will still need to import
the module, which is costly.
I think we should provide a symbol to distinguish different SQLite
classes, at least nodejs could make the first step.
---------
Signed-off-by: Alex Yang <himself65@outlook.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>1 parent a434ac2 commit cb4207e
2 files changed
+24
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
| |||
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
17 | 31 | | |
18 | 32 | | |
19 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
7 | 17 | | |
8 | 18 | | |
9 | 19 | | |
| |||
0 commit comments