This repository has been archived by the owner on Apr 25, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows referring to possibly-nonexistent tables with their unqualified names in raw commands, and is more consistent with the behavior of the Postgres and MySQL backends.
In particular, it enables creating tables using the
Queryable
interface. For instance, one can writedb.cmd_raw("CREATE TABLE my_table (x INTEGER);")
to create a table, instead ofdb.cmd_raw("CREATE TABLE db_name.my_table (x INTEGER);")
(wheredb_name
is the value of thedb_name
parameter in the database URL). This is useful because without it, one would have to re-parse the original database URL in order to get the value ofdb_name
, and then thread that value through all code that needs to create a table.For backwards compatibility, the database file is still attached as
db_name
too, so it's mapped as bothmain
anddb_name
.