libsql / libsql-node-sqlite3

node-sqlite3 compatible API for libSQL
MIT License
12 stars 1 forks source link

fix filename #7

Closed glommer closed 1 year ago

glommer commented 1 year ago

With the current code, when passing "file:foo.db", our driver creates a file called "file:foo.db", instead of the expected "foo.db"

honzasp commented 1 year ago

I'm unable to reproduce this issue, file: URLs are passed verbatim to sqlite3.Database() call with the OPEN_URI flag, so they should be parsed as URLs by sqlite. Do you have some reproducing example?

We can't parse a file: URL by dropping the first five characters and pretending that it's a filename, because the URI may also contain query parameters: https://www.sqlite.org/c3ref/open.html

glommer commented 1 year ago

strangely it worked now.

I was debugging the package, so I will just assume I was doing something on my end that caused this