mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 12:14:08 -06:00
is_current
This commit is contained in:
parent
df148ca9ea
commit
d83aa7f865
@ -25,13 +25,10 @@ FROM "resource"
|
|||||||
name), so we're guaranteed to have at most one matching row.
|
name), so we're guaranteed to have at most one matching row.
|
||||||
*/}}
|
*/}}
|
||||||
{{ if gt .ResourceVersion 0 }}
|
{{ if gt .ResourceVersion 0 }}
|
||||||
AND {{ .Ident "rv" }} <= {{ .Arg .ResourceVersion }}
|
AND {{ .Ident "rv" }} <= {{ .Arg .ResourceVersion }}
|
||||||
|
|
||||||
ORDER BY {{ .Ident "rv" }} DESC
|
ORDER BY {{ .Ident "rv" }} DESC
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
|
{{ else }}
|
||||||
|
AND {{ .Ident "is_current" }} = true
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
;
|
||||||
{{ if .SelectForUpdate }}
|
|
||||||
{{ .SelectFor "UPDATE NOWAIT" }}
|
|
||||||
{{ end }}
|
|
||||||
;
|
|
Loading…
Reference in New Issue
Block a user