Skip to content

Open database (.db) file without schema #1701

Answered by scarlac
linhttbk97 asked this question in Q&A
Discussion options

You must be logged in to vote

At that point, you may want to consider a separate SQLite library, as you'd not be using any of the WMDB features at all. Unfortunately, SQLite functionality isn't fully exposed like you want in WMDB, although I'd also like to see these features. One challenge is that WMDB does caching, so if you want to execute arbitrary SQL, it'll get complicated.

However, there is a way. You can open the DB and define a dummy schema with no migrations and no tables (I think?) and then use the "unsafe" functionality that's not officially documented, to execute queries directly. However, I don't really recommend doing that.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@linhttbk97
Comment options

Answer selected by linhttbk97
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants