CurtTilmes / raku-dbsqlite

SQLite access for Raku
10 stars 4 forks source link

How to open a db in readonly mode? #11

Closed hythm7 closed 3 years ago

hythm7 commented 3 years ago

I tried to pass the filename as file:db.sqlite?mode=ro but I get out of memory error.

CurtTilmes commented 3 years ago

That capability (and URI filenames in general) aren't yet implemented.

I'll try to add them when I get around to it. (Patches welcome!)

hythm7 commented 3 years ago

Tried to implement it in this branch but doesn't pass the test I added for sqlite3_open_v2, and dies with the out of memory error. Not sure what I'm missing. Any suggestion?

CurtTilmes commented 3 years ago

There was a bug in the error reporting that didn't convert the code to string properly resulting in "out of memory". I copied your stuff and did it slightly differently.

hythm7 commented 3 years ago

Thank you!