unified-storage: add Keys support to the sqlkv implementation (#115510)
* unified-storage: add `Keys` support to the sqlkv implementation * add validation for sort option * Revert sort order validation, assume desc when invalid
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
SELECT {{ .Ident "key_path" }}
|
||||
FROM {{ .TableName }}
|
||||
WHERE {{ .Ident "key_path" }} >= {{ .Arg .StartKey }}
|
||||
AND {{ .Ident "key_path" }} < {{ .Arg .EndKey }}
|
||||
ORDER BY {{ .Ident "key_path" }} {{ if .SortAscending }}ASC{{ else }}DESC{{ end }}
|
||||
{{ if .Options.Limit }}
|
||||
LIMIT {{ .Options.Limit }}
|
||||
{{ end }}
|
||||
;
|
||||
Reference in New Issue
Block a user