upsertQuery="""INSERT INTO ` + "`%s`" + ` (dirhash,name,directory,meta) VALUES(?,?,?,?) ON DUPLICATE KEY UPDATE meta = VALUES(meta)"""
enableUpsert=true
[postgres]#orcockroachdb,YugabyteDB
#CREATETABLEIFNOTEXISTSfilemeta(
@ -169,10 +167,9 @@ sslmode = "disable"
connection_max_idle=100
connection_max_open=100
connection_max_lifetime_seconds=0
#EmptyinsertQuerywillusethedefaultinsertquery
#exampleinsertQuerycanbeforUPSERTsyntax:
#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"""
upsertQuery="""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"""
enableUpsert=true
[postgres2]
enabled=false
@ -195,10 +192,9 @@ sslmode = "disable"
connection_max_idle=100
connection_max_open=100
connection_max_lifetime_seconds=0
#EmptyinsertQuerywillusethedefaultinsertquery
#exampleinsertQuerycanbeforUPSERTsyntax:
#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"""
upsertQuery="""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"""