Skip to content

Use only Prepared statements for queries #293

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

Closed
1 task done
elpiel opened this issue Apr 13, 2020 · 2 comments · Fixed by #399
Closed
1 task done

Use only Prepared statements for queries #293

elpiel opened this issue Apr 13, 2020 · 2 comments · Fixed by #399
Labels
good first issue Good for newcomers Low
Milestone

Comments

@elpiel
Copy link
Member

elpiel commented Apr 13, 2020

We currently have places where we don't use prepared statements for queries.
This could lead to bugs if Display and ToSql implementations for the struct are different, however this is not the case at the moment.

  • Change all remaining queries to use prepared statement parameters
@elpiel elpiel added good first issue Good for newcomers Low labels Apr 13, 2020
@elpiel elpiel added this to the sentry-v0.2.0 milestone Jan 5, 2021
@elpiel elpiel linked a pull request Aug 9, 2021 that will close this issue
@elpiel
Copy link
Member Author

elpiel commented Aug 9, 2021

There are places that remain which don't use parameters from a prepared statement and instead integrate the values directly into the query.
This will be changed with AIP#61 as a alterations of the code in the places where this happens is needed.

Example of such place is sentry/src/db/event_aggregate.rs:

https://github.com/AdExNetwork/adex-validator-stack-rust/blob/5ed4c4330bb134afb8ce6c3878751f6a25fcb471/sentry/src/db/event_aggregate.rs#L92

@elpiel
Copy link
Member Author

elpiel commented Feb 25, 2022

Since the development of AIP#61 #377 and the latest changes in PR #473
all queries that do not use prepared statements have been fixed or removed.

@elpiel elpiel closed this as completed Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Low
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant