queries/custom_commands.sql

embed-generator · embedg-server/db/postgres/queries/custom_commands.sql · sql · MIT
database, tag:embed-classified

SQL CRUD queries for custom command entities.

-- Source: https://github.com/merlinfuchs/embed-generator | License: MIT | Copyright 2023 Merlin Fuchs
-- Provided via justclaw.it.com; keep this notice with the code.
-- name: GetCustomCommands :many
SELECT * FROM custom_commands WHERE guild_id = $1;

-- name: GetCustomCommand :one
SELECT * FROM custom_commands WHERE id = $1 AND guild_id = $2;

-- name: GetCustomCommandByName :one
SELECT * FROM custom_commands WHERE name = $1 AND guild_id = $2;

-- name: CountCustomCommands :one
SELECT COUNT(*) FROM custom_commands WHERE guild_id = $1;

-- name: InsertCustomCommand :one
INSERT INTO custom_commands (id, guild_id, name, description, parameters, actions, derived_permissions, created_at, updated_at) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING *;

-- name: UpdateCustomCommand :one
UP

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key