We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment:
Issue description: I try to create a table with a default text
func create_table_tests() -> void: var table = { "id": { "data_type": "int", "primary_key": true, "auto_incremental": true, "not_null": true }, "date": { "data_type": "TEXT", "default": '2001-01-01 01:01:01' } } db.create_table("tests", table) pass
When creating it, the following error appears: --> SQL error: near "-": syntax error
If I activate the verbosity mode db.verbosity_level = SQLite.VerbosityLevel.VERBOSE
db.verbosity_level = SQLite.VerbosityLevel.VERBOSE
I see that the following query is being made:
CREATE TABLE IF NOT EXISTS tests (id INTEGER PRIMARY KEY NOT NULL,date TEXT DEFAULT 2001-01-01 01:01:01);
The error occurs because this date should have quotes: date TEXT DEFAULT 2001-01-01 01:01:01
ok: date TEXT DEFAULT '2001-01-01 01:01:01'
However, those quotes are not added when I add default text in the query
The text was updated successfully, but these errors were encountered:
Hello @devmark404 😄
This can be solved by encapsulating the offending string in an additional pair of (double or single) quotes, see here: #42
Sorry, something went wrong.
No branches or pull requests
Environment:
Issue description:
I try to create a table with a default text
When creating it, the following error appears:
--> SQL error: near "-": syntax error
If I activate the verbosity mode
db.verbosity_level = SQLite.VerbosityLevel.VERBOSE
I see that the following query is being made:
CREATE TABLE IF NOT EXISTS tests (id INTEGER PRIMARY KEY NOT NULL,date TEXT DEFAULT 2001-01-01 01:01:01);
The error occurs because this date should have quotes:
date TEXT DEFAULT 2001-01-01 01:01:01
ok:
date TEXT DEFAULT '2001-01-01 01:01:01'
However, those quotes are not added when I add default text in the query
The text was updated successfully, but these errors were encountered: