forked from sqlc-dev/sqlc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquery.sql
More file actions
23 lines (18 loc) · 769 Bytes
/
query.sql
File metadata and controls
23 lines (18 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- name: UpsertServerSetColumnTypo :exec
INSERT INTO servers(code, name) VALUES ($1, $2)
ON CONFLICT (code)
DO UPDATE SET name_typo = 1111;
-- name: UpsertServerConflictTargetTypo :exec
INSERT INTO servers(code, name) VALUES ($1, $2)
ON CONFLICT (code_typo)
DO UPDATE SET name = 1111;
-- name: UpsertServerExcludedColumnTypo :exec
INSERT INTO servers(code, name) VALUES ($1, $2)
ON CONFLICT (code)
DO UPDATE SET name = EXCLUDED.name_typo;
-- name: UpsertServerMissingConflictTarget :exec
INSERT INTO servers(code, name) VALUES ($1, $2)
ON CONFLICT DO UPDATE SET name = EXCLUDED.name;
-- name: UpsertServerOnConstraintExcludedTypo :exec
INSERT INTO servers(code, name) VALUES ($1, $2)
ON CONFLICT ON CONSTRAINT servers_pkey DO UPDATE SET name = EXCLUDED.name_typo;