You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a custom SQLite VFS implementation and I want to open a database within the VFS. SQLite allows me to specify the VFS implementation as a query parameter for URI filenames.
What is the feature you are proposing to solve the problem?
Always pass SQLITE_OPEN_URI to sqlite3_open_v2() like go-sqlite3 or the rust bindings rusqlite do. Note that specifying SQLITE_OPEN_URI does not require location to be an URI.
Allow passing arbitrary open flags. node-sqlite3 chose this path.
I think it makes sense to always pass SQLITE_OPEN_URI since Node.js tries to support URLs and file paths
Would be totally fine by me. I proposed the conservative option mainly because I don't know how much you care about the overlap between URIs and valid filepaths on Linux and BSDs, e.g. file:///bin/sh could either mean /bin/sh or ./file:/bin/sh on Linux.
Activity
cjihrig commentedon Feb 15, 2025
I think it makes sense to always pass
SQLITE_OPEN_URIsince Node.js tries to support URLs and file paths (related #56940).BurningEnlightenment commentedon Feb 15, 2025
Would be totally fine by me. I proposed the conservative option mainly because I don't know how much you care about the overlap between URIs and valid filepaths on Linux and BSDs, e.g.
file:///bin/shcould either mean/bin/shor./file:/bin/shon Linux.geeksilva97 commentedon Feb 21, 2025
Great! I took the opportunity to do this flag as default in that PR. It's ready for review
BurningEnlightenment commentedon Feb 21, 2025
Maybe it's worth to consider the fourth option: Pass
SQLITE_OPEN_URIif and only if the user provided anURLobject forlocation🤔geeksilva97 commentedon Mar 18, 2025
@BurningEnlightenment @cjihrig do you think we can close this issue since now, sqlite is accepting URL as database path and SQLITE_OPEN_URI is enabled?
https://nodejs.org/en/blog/release/v23.10.0
cjihrig commentedon Mar 18, 2025
I think so. Thanks!
BurningEnlightenment commentedon Mar 18, 2025
Can this be backported to the next
22release?geeksilva97 commentedon Mar 18, 2025
Yeah, I think so. Let me open it.
geeksilva97 commentedon Mar 18, 2025
#57533