feat: create save new agent in db

This commit is contained in:
2026-04-19 16:16:03 +03:00
parent 52766cf7e8
commit e289365ce8
14 changed files with 314 additions and 72 deletions
+14 -1
View File
@@ -1,3 +1,16 @@
-- name: CreateAgent :exec
INSERT INTO agents (agent_id, agent_name, architecture, system, hostname, version, capabilities)
VALUES ($1, $2, $3, $4, $5, $6, $7);
VALUES ($1, $2, $3, $4, $5, $6, $7);
-- name: GetAgentByID :one
SELECT * from agents
WHERE id=$1;
-- name: GetAgentByAgentID :one
SELECT * from agents
WHERE agent_id=$1;
-- 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;