fix: unified resource server list queries order column (#108094)
This commit is contained in:
committed by
GitHub
parent
5b82e05697
commit
4a779c4ccb
@@ -29,7 +29,7 @@ WHERE 1 = 1
|
||||
AND {{ .Ident "resource_version" }} = {{ .Arg .ExactRV }}
|
||||
{{ end }}
|
||||
{{ if .SortAscending }}
|
||||
ORDER BY resource_version ASC
|
||||
ORDER BY {{ .Ident "resource_version" }} ASC
|
||||
{{ else }}
|
||||
ORDER BY resource_version DESC
|
||||
ORDER BY {{ .Ident "resource_version" }} DESC
|
||||
{{ end }}
|
||||
|
||||
@@ -50,7 +50,7 @@ SELECT
|
||||
AND kv.{{ .Ident "name" }} = {{ .Arg .Request.Options.Key.Name }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
ORDER BY kv.{{ .Ident "namespace" }} ASC, kv.{{ .Ident "name" }} ASC
|
||||
ORDER BY kv.{{ .Ident "resource_version" }} ASC
|
||||
{{ if (gt .Request.Limit 0) }}
|
||||
LIMIT {{ .Arg .Request.Limit }} OFFSET {{ .Arg .Request.Offset }}
|
||||
{{ end }}
|
||||
|
||||
@@ -23,5 +23,5 @@ SELECT
|
||||
AND {{ .Ident "name" }} = {{ .Arg .Request.Options.Key.Name }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
ORDER BY {{ .Ident "namespace" }} ASC, {{ .Ident "name" }} ASC
|
||||
ORDER BY {{ .Ident "resource_version" }} ASC
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user