-- name: ListCollectorQueries :many
SELECT * FROM collectorQueryDependencyTree WHERE collectorId = $1;

-- name: GetCollectorByJobID :one
SELECT * FROM fullActiveCollectors WHERE jobId = $1 LIMIT 1;

-- name: GetCollector :one
SELECT * FROM fullActiveCollectors WHERE id = $1 LIMIT 1;

-- name: CreateCollector :one
INSERT INTO collectors (jobId, minCleanVersion, minTextVersion) VALUES ($1, $2, $3) RETURNING id;

-- name: AddCollectorQuery :exec
INSERT INTO collectorQueries (collectorId, name, queryId, addedVersion) VALUES ($1, $2, $3, $4);
