postgres2 & memsql2

add escape (quote identifiers) for the dynamic sql
so tables (collections) with special characters will work.
This commit is contained in:
LazyDBA247-Anyvision
2021-02-14 13:14:36 +02:00
parent 876dbe3d26
commit 51b4963e2e
7 changed files with 27 additions and 27 deletions

View File

@@ -124,11 +124,11 @@ interpolateParams = false
[mysql2] # or memsql, tidb
enabled = false
createTable = """
CREATE TABLE IF NOT EXISTS %s (
dirhash BIGINT,
name VARCHAR(1000),
directory TEXT,
meta LONGBLOB,
CREATE TABLE IF NOT EXISTS ` + "`%s`" + ` (
dirhash BIGINT,
name VARCHAR(1000),
directory TEXT,
meta LONGBLOB,
PRIMARY KEY (dirhash, name)
) DEFAULT CHARSET=utf8;
"""
@@ -164,7 +164,7 @@ connection_max_open = 100
[postgres2]
enabled = false
createTable = """
CREATE TABLE IF NOT EXISTS %s (
CREATE TABLE IF NOT EXISTS "%s" (
dirhash BIGINT,
name VARCHAR(65535),
directory VARCHAR(65535),