Skip to content

Commit

Permalink
Updated facts sql
Browse files Browse the repository at this point in the history
  • Loading branch information
CGoodwin90 committed May 31, 2024
1 parent a228af0 commit 64bfbea
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions services/api/src/resources/fact/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,15 @@ export const Sql = {
.where('r.name', '=', name)
.andWhere('f.environment', '=', environmentId)
.toString(),
selectFactByNameSourceAndEnvironmentId: (name: string, source: string, environmentId: number) =>
knex('environment_fact')
.where('name', '=', name)
.andWhere('environment', '=', environmentId)
.andWhere('source', '=', source)
.toString(),
selectFactReferencesByFactId: (fid: number) =>
knex('environment_fact_reference')
.where('fid', '=', fid)
.toString(),
insertFactReference: ({ fid, name }) =>
knex('environment_fact_reference')
.insert({ fid, name })
.onConflict(['name', 'fid'])
.merge()
.toString(),
deleteFactReferencesByFactId: (fid) =>
knex('environment_fact_reference')
Expand Down

0 comments on commit 64bfbea

Please sign in to comment.