aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/ydb/ydb_queries.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2022-05-03 15:18:28 +0500
committerKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2022-05-03 15:18:28 +0500
commit8342f651f393a2b939de39af8a92f42077ca00fb (patch)
tree8917a25a911dd130314ae58febf19d50383e24e9 /weed/filer/ydb/ydb_queries.go
parent2d27afb51541de9cb64592813e63fde5394e13ef (diff)
downloadseaweedfs-8342f651f393a2b939de39af8a92f42077ca00fb.tar.xz
seaweedfs-8342f651f393a2b939de39af8a92f42077ca00fb.zip
fix scanNamed
Diffstat (limited to 'weed/filer/ydb/ydb_queries.go')
-rw-r--r--weed/filer/ydb/ydb_queries.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/weed/filer/ydb/ydb_queries.go b/weed/filer/ydb/ydb_queries.go
index 659cc2158..bc2f37b10 100644
--- a/weed/filer/ydb/ydb_queries.go
+++ b/weed/filer/ydb/ydb_queries.go
@@ -5,8 +5,8 @@ import asql "github.com/chrislusf/seaweedfs/weed/filer/abstract_sql"
const (
insertQuery = `
DECLARE $dir_hash AS int64;
- DECLARE $name AS Utf8;
DECLARE $directory AS Utf8;
+ DECLARE $name AS Utf8;
DECLARE $meta AS String;
UPSERT INTO ` + asql.DEFAULT_TABLE + `
@@ -16,8 +16,8 @@ const (
updateQuery = `
DECLARE $dir_hash AS int64;
- DECLARE $name AS Utf8;
DECLARE $directory AS Utf8;
+ DECLARE $name AS Utf8;
DECLARE $meta AS String;
REPLACE INTO ` + asql.DEFAULT_TABLE + `
@@ -31,7 +31,7 @@ const (
DECLARE $name AS Utf8;
DELETE FROM ` + asql.DEFAULT_TABLE + `
- WHERE dir_hash == $dir_hash AND name == $name;
+ WHERE dir_hash = $dir_hash AND name = $name;
COMMIT;`
findQuery = `
@@ -40,14 +40,14 @@ const (
SELECT meta
FROM ` + asql.DEFAULT_TABLE + `
- WHERE dir_hash == $dir_hash AND name == $name;`
+ WHERE dir_hash = $dir_hash AND name = $name;`
deleteFolderChildrenQuery = `
DECLARE $dir_hash AS int64;
DECLARE $directory AS Utf8;
DELETE FROM ` + asql.DEFAULT_TABLE + `
- WHERE dir_hash == $dir_hash AND directory == $directory;
+ WHERE dir_hash = $dir_hash AND directory = $directory;
COMMIT;`
listDirectoryQuery = `
@@ -59,6 +59,6 @@ const (
SELECT name, meta
FROM ` + asql.DEFAULT_TABLE + `
- WHERE dir_hash == $dir_hash AND directory == $directory and name %s $start_name and name LIKE $prefix
+ WHERE dir_hash = $dir_hash AND directory = $directory and name %s $start_name and name LIKE $prefix
ORDER BY name ASC LIMIT $limit;`
)