If the file permissions do not allow access to the db file, instead of returning an error tuple the library throws a MatchError:
pry(1)> Sqlitex.with_db('file.db', fn db -> Sqlitex
.query(db, sql_search) end)
** (MatchError) no match of right hand side value: {:error, {:cantopen, 'unable to open database
file'}}
The same occurs if an empty sql string is passed:
pry(1)> Sqlitex.query(db, "")
** (MatchError) no match of right hand side value: {:error, :no_prepared_statement}
Thanks for providing this library! It's super useful
If the file permissions do not allow access to the db file, instead of returning an error tuple the library throws a MatchError:
The same occurs if an empty sql string is passed:
Thanks for providing this library! It's super useful