creatorupdatordeprecate
This commit is contained in:
@@ -35,15 +35,18 @@ func (q *Queries) GetCollectorFromJobID(ctx context.Context, jobid pgtype.UUID)
|
||||
}
|
||||
|
||||
const getCollectorQueries = `-- name: GetCollectorQueries :many
|
||||
SELECT collectorId, queryId, type, requiredQueryId, queryVersion FROM collectorQueryDependencyTree WHERE collectorId = $1
|
||||
SELECT collectorId, queryId, type, queryVersion, ARRAY_AGG(requiredQueryId) AS requiredIds
|
||||
FROM collectorQueryDependencyTree
|
||||
WHERE collectorId = $1
|
||||
GROUP BY queryId, collectorId, type, queryVersion
|
||||
`
|
||||
|
||||
type GetCollectorQueriesRow struct {
|
||||
Collectorid pgtype.UUID
|
||||
Queryid pgtype.UUID
|
||||
Type NullQuerytype
|
||||
Requiredqueryid pgtype.UUID
|
||||
Queryversion pgtype.Int4
|
||||
Collectorid pgtype.UUID
|
||||
Queryid pgtype.UUID
|
||||
Type NullQuerytype
|
||||
Queryversion pgtype.Int4
|
||||
Requiredids []pgtype.UUID
|
||||
}
|
||||
|
||||
func (q *Queries) GetCollectorQueries(ctx context.Context, collectorid pgtype.UUID) ([]GetCollectorQueriesRow, error) {
|
||||
@@ -59,8 +62,8 @@ func (q *Queries) GetCollectorQueries(ctx context.Context, collectorid pgtype.UU
|
||||
&i.Collectorid,
|
||||
&i.Queryid,
|
||||
&i.Type,
|
||||
&i.Requiredqueryid,
|
||||
&i.Queryversion,
|
||||
&i.Requiredids,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user