skeleton/internal/database/sql/queries/person.sql

41 lines
527 B
MySQL
Raw Normal View History

2020-07-21 22:50:11 +02:00
-- 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;