41 lines
527 B
MySQL
41 lines
527 B
MySQL
|
-- Name: CreatePerson :one
|
||
|
INSERT INTO "person" (
|
||
|
"identity_id",
|
||
|
"display_name",
|
||
|
"first_name",
|
||
|
"last_name",
|
||
|
"image_url",
|
||
|
"zoneinfo",
|
||
|
"locale"
|
||
|
) VALUES (
|
||
|
$1,
|
||
|
$2,
|
||
|
$3,
|
||
|
$4,
|
||
|
$5,
|
||
|
$6,
|
||
|
$7
|
||
|
) RETURNING *;
|
||
|
|
||
|
-- Name: GetPersonByIdentityID :one
|
||
|
SELECT * FROM "person"
|
||
|
WHERE
|
||
|
"identity_id" = $1
|
||
|
LIMIT 1;
|
||
|
|
||
|
-- Name: UpdatePerson :exec
|
||
|
UPDATE "person" SET (
|
||
|
"display_name",
|
||
|
"first_name",
|
||
|
"last_name",
|
||
|
"image_url",
|
||
|
"zoneinfo",
|
||
|
"locale"
|
||
|
) = (
|
||
|
$2,
|
||
|
$3,
|
||
|
$4,
|
||
|
$5,
|
||
|
$6,
|
||
|
$7
|
||
|
) WHERE "identity_id" = $1;
|