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
How to set options when using better-sqlite3 with sqlcipher? #8475
Comments
The issue is In my opinion this execution order is not effective or helpful at all when coupled with custom implementations of the library which in this case is an encryption extension. Current method of initialization also goes against the practices of official SQLite Encryption Extension which has identical usage and behavior to
There are two possible solutions for this.
Please feel free to point out anything I have missed here because I've never used |
typeorm/src/driver/better-sqlite3/BetterSqlite3Driver.ts Lines 102 to 120 in cefddd9
Here is the related code. I don't see anything wrong with the logical order. Please review it, maybe you can focus on some problems. |
@yolopunk That's the same block of code which I linked above.
This line should not execute before |
@m4heshd Awesome! That is worked by verification. I could commit a pull request for fixed the bug! Thank you very much! |
@yolopunk I wouldn't jump into that because that could be a breaking change for the existing users. Introducing something new would be the best option here. |
see documentation: https://www.sqlite.org/see/doc/release/www/readme.wiki * fix: sqlite driver * fix: better-sqlite3 driver Closed: typeorm#8475
#8478) see documentation: https://www.sqlite.org/see/doc/release/www/readme.wiki * fix: sqlite driver * fix: better-sqlite3 driver Closed: #8475
Thank you guys! |
Issue type:
Database system/driver:
TypeORM version:
[x] 0.2.41
[ ] @next
[ ] 0.x.x (or put your version here)
better-sqlite3-multiple-ciphers version: 7.4.5
better-sqlite3-multiple-ciphers
)typeorm
)I don’t know what’s wrong with my options for
typeorm
.Related to issue: m4heshd/better-sqlite3-multiple-ciphers#4
The reproducible repo: https://github.com/yolopunk/typeorm-better-sqlite-sqlcipher
The text was updated successfully, but these errors were encountered: