mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
Add a new SQL query `GetAction` to retrieve a single action by its ID. This query will be needed for the kvdb to SQL migration of actions store.
21 lines
No EOL
506 B
SQL
21 lines
No EOL
506 B
SQL
-- name: InsertAction :one
|
|
INSERT INTO actions (
|
|
session_id, account_id, macaroon_identifier, actor_name, feature_name, action_trigger,
|
|
intent, structured_json_data, rpc_method, rpc_params_json, created_at,
|
|
action_state, error_reason
|
|
) VALUES (
|
|
$1, $2, $3, $4, $5, $6,
|
|
$7, $8, $9, $10, $11, $12, $13
|
|
) RETURNING id;
|
|
|
|
-- name: SetActionState :exec
|
|
UPDATE actions
|
|
SET action_state = $1,
|
|
error_reason = $2
|
|
WHERE id = $3;
|
|
|
|
|
|
-- name: GetAction :one
|
|
SELECT *
|
|
FROM actions
|
|
WHERE id = $1; |