naise_pos/db/query/merchants.sql

14 lines
248 B
MySQL
Raw Permalink Normal View History

2023-03-13 09:24:59 +07:00
-- name: CreateMerchant :one
INSERT INTO merchants (name,owner_id)
VALUES ($1, $2)
RETURNING *;
2023-03-05 23:35:41 +07:00
-- name: GetMerchantById :one
SELECT * FROM merchants
WHERE id = $1;
-- name: GetMerchantByUserId :one
SELECT * FROM merchants
WHERE owner_id = $1;