ydb filer improvements (#6890)

* fix(ydb): table creation with params

* fix(ydb): migrate to new query client & prevent creation table-bucket on get request

* fix(ydb): use new query client with kv req

* fix(ydb): use directory in every query

* fix(ydb): del unused import

* fix(ydb): tests & default const usage
This commit is contained in:
SmoothDenis
2025-06-20 02:16:01 +05:00
committed by GitHub
parent da728750be
commit abd5102819
5 changed files with 218 additions and 153 deletions

View File

@@ -22,19 +22,21 @@ const (
deleteQuery = `
PRAGMA TablePathPrefix("%v");
DECLARE $dir_hash AS int64;
DECLARE $directory AS Utf8;
DECLARE $name AS Utf8;
DELETE FROM ` + asql.DEFAULT_TABLE + `
WHERE dir_hash = $dir_hash AND name = $name;`
WHERE dir_hash = $dir_hash AND directory = $directory AND name = $name;`
findQuery = `
PRAGMA TablePathPrefix("%v");
DECLARE $dir_hash AS int64;
DECLARE $directory AS Utf8;
DECLARE $name AS Utf8;
SELECT meta
FROM ` + asql.DEFAULT_TABLE + `
WHERE dir_hash = $dir_hash AND name = $name;`
WHERE dir_hash = $dir_hash AND directory = $directory AND name = $name;`
deleteFolderChildrenQuery = `
PRAGMA TablePathPrefix("%v");