mirror of
https://github.com/lorsanstand/HomeOps-Hub.git
synced 2026-06-19 16:45:15 +03:00
refactor: migrate to sqlite
This commit is contained in:
@@ -1,16 +1,22 @@
|
||||
-- name: CreateAgent :exec
|
||||
INSERT INTO agents (agent_id, agent_name, architecture, system, hostname, version, capabilities)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7);
|
||||
VALUES (:agent_id, :agent_name, :architecture, :system, :hostname, :version, :capabilities);
|
||||
|
||||
-- name: GetAgentByID :one
|
||||
SELECT * from agents
|
||||
WHERE id=$1;
|
||||
WHERE id = :id;
|
||||
|
||||
-- name: GetAgentByAgentID :one
|
||||
SELECT * from agents
|
||||
WHERE agent_id=$1;
|
||||
WHERE agent_id = :agent_id;
|
||||
|
||||
-- name: UpdateAgentByID :exec
|
||||
UPDATE agents
|
||||
SET agent_id=$1, agent_name=$2, architecture=$3, system=$4, hostname=$5, version=$6, capabilities=$7
|
||||
WHERE id=$8;
|
||||
SET agent_id = :agent_id,
|
||||
agent_name = :agent_name,
|
||||
architecture = :architecture,
|
||||
system = :system,
|
||||
hostname = :hostname,
|
||||
version = :version,
|
||||
capabilities = :capabilities
|
||||
WHERE id = :id;
|
||||
Reference in New Issue
Block a user