[Multi-Database Support] Without Reliance on globally_quoted_identifiers Variable#4749
Merged
nobodyiam merged 8 commits intoapolloconfig:masterfrom Mar 1, 2023
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4749 +/- ##
============================================
+ Coverage 47.16% 47.28% +0.12%
- Complexity 1656 1661 +5
============================================
Files 349 349
Lines 10691 10691
Branches 1062 1062
============================================
+ Hits 5042 5055 +13
+ Misses 5343 5329 -14
- Partials 306 307 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Member
|
There are some errors when tested on my laptop...It looks like the |
Member
|
It works after I changed the table name to `Release`. So I suppose we need to check whether there are more tables/columns need to be manually quoted? @Entity
@Table(name = "`Release`")
@SQLDelete(sql = "Update Release set IsDeleted = 1, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?")
@Where(clause = "isDeleted = 0")
public class Release extends BaseEntity { |
521ce82 to
2686e1c
Compare
Member
Author
|
@nobodyiam Thanks, I will double checked with Mysql keywords first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Setting globally_quoted_identifiers Variable to true will restrict running on other databases, like h2, postgre. We can easily setting globally_quoted_identifiers to false, and manual use ` wrap the database field. That's what I do in #4745
Tested on my laptop.
Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean testto make sure this pull request doesn't break anything.CHANGESlog.