`sqlite3_open` seems to dislike AbstractStrings?
geoffleyland opened this issue · comments
Hi,
we have a bug where sometimes we can open databases, and sometimes we get
SQLite.SQLiteException("unable to open database file")
.
It goes away when we call SQLite.DB
as SQLite.DB(String(our_file_name))
.
SQLite.DB
takes an AbstractString
as an argument, but I wonder whether the sqlite3_open
on line 82 of SQLite.jl doesn't like being handed the wrong kind of string?
Just to add to this, it failed it a case where db_name
was passed through from Docopt and was a SubString{String}
. We put a test in our code for explicitly for SubStrings, but the test doesn't fail (in the test we construct a SubString, rather than using Doctopt).
So no problem if the answer is "works for me", because sometimes it works for us too.
I put up a PR to just convert to a String anyway, which seems like a good solution if it avoids any weirdness. #266