Skip to content

Commit

Permalink
Add ListRuleTypesReferencesByDataSource db query (#5057)
Browse files Browse the repository at this point in the history
Signed-off-by: Radoslav Dimitrov <[email protected]>
  • Loading branch information
rdimitrov authored Nov 26, 2024
1 parent e51bae0 commit ef132da
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
15 changes: 15 additions & 0 deletions database/mock/store.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions database/query/datasources.sql
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,9 @@ WHERE project_id = ANY(sqlc.arg(projects)::uuid[]);
SELECT * FROM data_sources_functions
WHERE data_source_id = $1 AND project_id = $2;

-- ListRuleTypesReferencesByDataSource retrieves all rule types
-- referencing a given data source in a given project.
--
-- name: ListRuleTypesReferencesByDataSource :many
SELECT * FROM rule_type_data_sources
WHERE data_sources_id = $1 AND project_id = $2;
35 changes: 35 additions & 0 deletions internal/db/datasources.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions internal/db/querier.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ef132da

Please sign in to comment.