Fix sqlite multiline query parse #2367

Merged
lunny merged 1 commits from KN4CK3R/xorm:fix-sqlite3-parse into v1 2023-12-01 07:07:36 +00:00
Contributor

The app "DB Browser for SQLite" produces multiline queries in the sqlite_master table which xorm can't parse.

Examples:

CREATE TABLE "push_mirror"
(
    id             INTEGER           not null
        primary key autoincrement,
    repo_id        INTEGER,
    remote_name    TEXT,
    interval       INTEGER,
    created_unix   INTEGER,
    last_update    INTEGER,
    last_error     TEXT,
    sync_on_commit INTEGER default 0 not null
, `remote_address` TEXT NULL)
CREATE INDEX "IDX_audit_event_action" ON "audit_event" (
	"action"
)
The app "DB Browser for SQLite" produces multiline queries in the `sqlite_master` table which xorm can't parse. Examples: ``` CREATE TABLE "push_mirror" ( id INTEGER not null primary key autoincrement, repo_id INTEGER, remote_name TEXT, interval INTEGER, created_unix INTEGER, last_update INTEGER, last_error TEXT, sync_on_commit INTEGER default 0 not null , `remote_address` TEXT NULL) ``` ``` CREATE INDEX "IDX_audit_event_action" ON "audit_event" ( "action" ) ```
KN4CK3R added 1 commit 2023-11-21 16:06:52 +00:00
Some checks failed
test cockroach / test cockroach (pull_request) Has been cancelled
test mariadb / test mariadb (pull_request) Has been cancelled
test mssql / test mssql (pull_request) Has been cancelled
test mysql / test mysql (pull_request) Has been cancelled
test mysql8 / test mysql8 (pull_request) Has been cancelled
test postgres / test postgres (pull_request) Has been cancelled
test sqlite / unit test & test sqlite (pull_request) Has been cancelled
test tidb / test tidb (pull_request) Has been cancelled
b8bbcb56c0
Fix newline parse.
KN4CK3R force-pushed fix-sqlite3-parse from b8bbcb56c0 to 1fe6c45746 2023-11-21 16:07:42 +00:00 Compare
Owner

For stable version, please send to v1 branch. main branch now will be for v2.

For stable version, please send to v1 branch. `main` branch now will be for v2.
KN4CK3R force-pushed fix-sqlite3-parse from 1fe6c45746 to 06867dd01a 2023-11-29 16:23:10 +00:00 Compare
KN4CK3R changed target branch from main to v1 2023-11-29 16:23:22 +00:00
lunny approved these changes 2023-12-01 07:07:27 +00:00
lunny merged commit 529a264d8e into v1 2023-12-01 07:07:36 +00:00
lunny added the
frontport/main
label 2023-12-30 08:39:05 +00:00
lunny added this to the 1.3.6 milestone 2023-12-30 08:39:11 +00:00
Sign in to join this conversation.
No description provided.