work on optimising vcenter queries
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-01-14 17:00:40 +11:00
parent 44ae2094f3
commit 56f021590d
8 changed files with 419 additions and 193 deletions

View File

@@ -119,3 +119,13 @@ INSERT INTO inventory_history (
?, ?, ?, ?, ?, ?, ?
)
RETURNING *;
-- name: SqliteTableExists :one
SELECT COUNT(1) AS count
FROM sqlite_master
WHERE type = 'table' AND name = sqlc.arg('table_name');
-- name: SqliteColumnExists :one
SELECT COUNT(1) AS count
FROM pragma_table_info
WHERE name = sqlc.arg('column_name');