Files
libredesk/internal/csat/queries.sql
T
Abhinav Raut 88a58c0f3b Custom static directory support, self hosted installations can pass static dir path to override csat and other web-templates, js and css files. Allowing instances to be fully customizable.
- New meta JSONB field in CSAT responses to capture random adhoc data as that might be needed for custom CSAT pages.
- Add support prefilled rating for csat pages picked from query param
2026-04-09 00:04:00 +05:30

28 lines
448 B
SQL

-- name: insert
INSERT INTO csat_responses (
conversation_id
)
VALUES ($1)
RETURNING uuid;
-- name: get
SELECT id,
uuid,
created_at,
updated_at,
conversation_id,
rating,
feedback,
meta,
response_timestamp
FROM csat_responses
WHERE uuid = $1;
-- name: update
UPDATE csat_responses
SET rating = $2,
feedback = $3,
meta = COALESCE($4::jsonb, '{}'),
response_timestamp = NOW()
WHERE uuid = $1;