-- name: CreateClient :one
INSERT INTO clients (name) VALUES ($1) RETURNING id;

-- name: GetClient :one
SELECT c.id, c.name, cs.canSync
    FROM clients as c
    JOIN currentClientCanSync as cs on cs.clientId = c.id
    WHERE c.id = $1;

-- name: UpdateClient :exec
UPDATE clients SET name = $1 WHERE id = $2;

-- name: AddClientCanSync :exec
INSERT INTO clientCanSync (canSync, clientId) VALUES ($1, $2);