Files
coder/coderd/database/queries/chatorganizationsystemprompts.sql
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
425 B
SQL
Raw Normal View History

-- name: GetChatOrganizationSystemPrompt :one
SELECT *
FROM chat_organization_system_prompts
WHERE organization_id = @organization_id;
-- name: UpsertChatOrganizationSystemPrompt :one
INSERT INTO chat_organization_system_prompts (organization_id, system_prompt)
VALUES (@organization_id, @system_prompt)
ON CONFLICT (organization_id) DO UPDATE
SET system_prompt = EXCLUDED.system_prompt,
updated_at = now()
RETURNING *;