Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Preparex to the DB statements #104

Merged
merged 2 commits into from
Jul 17, 2024
Merged

Added Preparex to the DB statements #104

merged 2 commits into from
Jul 17, 2024

Conversation

begmaroman
Copy link
Contributor

No description provided.

@begmaroman begmaroman requested a review from a team as a code owner July 17, 2024 07:54
@begmaroman begmaroman self-assigned this Jul 17, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
78.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@begmaroman begmaroman requested review from rachit77 and removed request for Stefan-Ethernal July 17, 2024 14:29
@@ -142,12 +180,13 @@ func (db *pgDB) StoreUnresolvedBatchKeys(ctx context.Context, bks []types.BatchK
return err
}

stmt, err := tx.PreparexContext(ctx, storeUnresolvedBatchesSQL)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious. We can not prepare statements in the constructor for sql queries that store data? Just the ones that retrieve data?

I am asking this because I see you are not preparing statements for some queries.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is executed within the transaction so preparing it in the contractor is not doable. I'll change this logic in the next PR and all queries will be prepared in the constructor.

@begmaroman begmaroman merged commit 6b4ea8b into main Jul 17, 2024
7 of 9 checks passed
@begmaroman begmaroman deleted the feature/CDK-374 branch July 17, 2024 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants