* Batch write events * Improve instrumentation * Measure batch phases * Detect lock contention * remove the execBatch goroutine * removing tracing prefix * detect context cancel * batch channel map
13 lines
463 B
SQL
13 lines
463 B
SQL
UPDATE {{ .Ident "resource" }}
|
|
SET {{ .Ident "resource_version" }} = (
|
|
CASE
|
|
{{ range $guid, $rv := .GUIDToRV }}
|
|
WHEN {{ $.Ident "guid" }} = {{ $.Arg $guid }} THEN CAST({{ $.Arg $rv }} AS {{ if eq $.DialectName "postgres" }}BIGINT{{ else }}SIGNED{{ end }})
|
|
{{ end }}
|
|
END
|
|
)
|
|
WHERE {{ .Ident "guid" }} IN (
|
|
{{$first := true}}
|
|
{{ range $guid, $rv := .GUIDToRV }}{{if $first}}{{$first = false}}{{else}}, {{end}}{{ $.Arg $guid }}{{ end }}
|
|
);
|