-
Notifications
You must be signed in to change notification settings - Fork 62
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
MySQL Exists statement Support #1760
Conversation
…ased on the drivers which handle all details Signed-off-by: Aindriu Lavelle <[email protected]>
Signed-off-by: Aindriu Lavelle <[email protected]>
boolean res = schemaRequestRepo.existsRecordsCountForTeamId(teamId, tenantId); | ||
boolean res = | ||
schemaRequestRepo.existsByTeamIdAndTenantIdAndRequestStatus( | ||
teamId, tenantId, RequestStatus.CREATED.value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding request status parameter intentional ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it was hard coded in the native query for the requests it is checking if there is an open request for that team
Signed-off-by: Aindriu Lavelle <[email protected]>
6aea173
to
09dc24b
Compare
@@ -34,19 +34,11 @@ boolean existsSchemaRequestByEnvironmentAndTenantId( | |||
boolean existsSchemaRequestByEnvironmentAndTenantIdAndRequestStatus( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not part of this change, but an unused method, can be deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
…he db to the app and vice versa Signed-off-by: Aindriu Lavelle <[email protected]>
a263dcb
to
1bea3ba
Compare
We found during testing that mysql was only saving datetime down to seconds, where h2 was down to the millisecond. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
* Remove custom exists queries and use jpql to have spring do queries based on the drivers which handle all details Signed-off-by: Aindriu Lavelle <[email protected]> * Run spotless:apply Signed-off-by: Aindriu Lavelle <[email protected]> * Update to recitfy exists statement that had a not clause in it. Signed-off-by: Aindriu Lavelle <[email protected]> * Use a converter to ensure that the data is converted correctly from the db to the app and vice versa Signed-off-by: Aindriu Lavelle <[email protected]> --------- Signed-off-by: Aindriu Lavelle <[email protected]>
* Remove custom exists queries and use jpql to have spring do queries based on the drivers which handle all details * Run spotless:apply * Update to recitfy exists statement that had a not clause in it. * Use a converter to ensure that the data is converted correctly from the db to the app and vice versa --------- Signed-off-by: Aindriu Lavelle <[email protected]>
Remove custom exists queries and use jpql to have spring do queries based on the drivers which handle all details
About this change - What it does
Uses JPQL to handle exists requests and removes the native queries.
Resolves: #xxxxx
Why this way