Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
barroco committed Feb 4, 2025
1 parent ed79acc commit ddd69f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions pkg/scd/store/cockroach/constraints.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ func (c *repo) UpsertConstraint(ctx context.Context, s *scdmodels.Constraint) (*
%s = $8,
%s = $9,
%s = transaction_timestamp()
WHERE scd_constraints.%s = $1
RETURNING
%s`,
constraintFieldsWithoutPrefix,
Expand All @@ -156,7 +155,6 @@ func (c *repo) UpsertConstraint(ctx context.Context, s *scdmodels.Constraint) (*
constraintFieldsWithIndices[7],
constraintFieldsWithIndices[8],
constraintFieldsWithIndices[9],
constraintFieldsWithIndices[0],
constraintFieldsWithPrefix,
)
)
Expand Down Expand Up @@ -228,7 +226,7 @@ func (c *repo) SearchConstraints(ctx context.Context, v4d *dssmodels.Volume4D) (
COALESCE(starts_at <= $3, true)
AND
COALESCE(ends_at >= $2, true)
LIMIT $4;
LIMIT $4
`, constraintFieldsWithoutPrefix)
)

Expand Down
6 changes: 3 additions & 3 deletions pkg/scd/store/cockroach/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,12 @@ func (c *repo) pushSubscription(ctx context.Context, q dsssql.Queryable, s *scdm
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, transaction_timestamp())
ON CONFLICT (%s) DO UPDATE
SET %s = $2,
%s = $3::int,
%s = $3,
%s = $4,
%s = $5::int,
%s = $5,
%s = $6,
%s = $7,
%s = $8::bool,
%s = $8,
%s = $9,
%s = $10,
%s = $11,
Expand Down

0 comments on commit ddd69f5

Please sign in to comment.