fixes from comments

https://github.com/chrislusf/seaweedfs/pull/2996
This commit is contained in:
Konstantin Lebedev
2022-05-11 21:50:09 +05:00
parent bff1ccc1de
commit f523aed3c9
4 changed files with 64 additions and 60 deletions

View File

@@ -6,7 +6,7 @@ package ydb
import asql "github.com/chrislusf/seaweedfs/weed/filer/abstract_sql"
const (
insertQuery = `
upsertQuery = `
PRAGMA TablePathPrefix("%v");
DECLARE $dir_hash AS int64;
DECLARE $directory AS Utf8;
@@ -19,19 +19,6 @@ const (
VALUES
($dir_hash, $name, $directory, $meta, $expire_at);`
updateQuery = `
PRAGMA TablePathPrefix("%v");
DECLARE $dir_hash AS int64;
DECLARE $directory AS Utf8;
DECLARE $name AS Utf8;
DECLARE $meta AS String;
DECLARE $expire_at AS Optional<uint32>;
REPLACE INTO ` + asql.DEFAULT_TABLE + `
(dir_hash, name, directory, meta, expire_at)
VALUES
($dir_hash, $name, $directory, $meta, $expire_at);`
deleteQuery = `
PRAGMA TablePathPrefix("%v");
DECLARE $dir_hash AS int64;