SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
scaffold - insertQuery
LazyDBA247-Anyvision96c62bd34d4d
diff --git a/weed/command/scaffold.go b/weed/command/scaffold.goindex 52b5475635..3296ebf21f 100644--- a/weed/command/scaffold.go+++ b/weed/command/scaffold.go@@ -102,6 +102,10 @@ enabled = falsedir = "./filerrdb" # directory to store rocksdb files[mysql] # or memsql, tidb+# Empty insertQuery will use the default insert query+# example insertQuery can be for UPSERT syntax:+# insertQuery = """INSERT INTO ` + "`%s`" + ` (dirhash,name,directory,meta) VALUES(?,?,?,?) ON DUPLICATE KEY UPDATE meta = VALUES(meta)"""+insertQuery = ""# CREATE TABLE IF NOT EXISTS filemeta (# dirhash BIGINT COMMENT 'first 64 bits of MD5 hash value of directory field',# name VARCHAR(1000) BINARY COMMENT 'directory or file name',@@ -123,6 +127,10 @@ interpolateParams = false[mysql2] # or memsql, tidbenabled = false+# Empty insertQuery will use the default insert query+# example insertQuery can be for UPSERT syntax:+# insertQuery = """INSERT INTO ` + "`%s`" + ` (dirhash,name,directory,meta) VALUES(?,?,?,?) ON DUPLICATE KEY UPDATE meta = VALUES(meta)"""+insertQuery = ""createTable = """CREATE TABLE IF NOT EXISTS ` + "`%s`" + ` (dirhash BIGINT,@@ -143,6 +151,10 @@ connection_max_lifetime_seconds = 0interpolateParams = false[postgres] # or cockroachdb, YugabyteDB+# Empty insertQuery will use the default insert query+# example insertQuery can be for UPSERT syntax:+# insertQuery = """INSERT INTO "%[1]s" (dirhash,name,directory,meta) VALUES($1,$2,$3,$4) ON CONFLICT ON CONSTRAINT "%[1]s_pkey" DO UPDATE SET meta = EXCLUDED.meta WHERE "%[1]s".meta != EXCLUDED.meta"""+insertQuery = ""# CREATE TABLE IF NOT EXISTS filemeta (# dirhash BIGINT,# name VARCHAR(65535),@@ -164,6 +176,10 @@ connection_max_lifetime_seconds = 0[postgres2]enabled = false+# Empty insertQuery will use the default insert query+# example insertQuery can be for UPSERT syntax:+# insertQuery = """INSERT INTO "%[1]s" (dirhash,name,directory,meta) VALUES($1,$2,$3,$4) ON CONFLICT ON CONSTRAINT "%[1]s_pkey" DO UPDATE SET meta = EXCLUDED.meta WHERE "%[1]s".meta != EXCLUDED.meta"""+insertQuery = ""createTable = """CREATE TABLE IF NOT EXISTS "%s" (dirhash BIGINT,