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
Compacted-SQL #1153
Compacted-SQL #1153
Conversation
String literals should not be modified. insert into (id, desc) values (1, '----
some text
---'); All we can do, I think, is to remove leading/trailing whitespaces (i.e. trim()). |
@harawata |
Update / Insert into , is the values not dynamic ? It would write in XML... |
Hi @zhaoxi1988 , |
What is your idea to handle source-sql in Mapper.xml ? |
I'll comment soon. Sorry for the delay! |
Hi @zhaoxi1988 , Quick question. Adding a new option is a big deal to MyBais and this feature has only limited uses, so I wanted to fix this without adding a new option. |
@harawata It is useful when it occurs at our high concurrent application. We need the SQL in InnoDB log. Below the question , we can fix it.
|
Are you thinking about parsing SQL?
Yes, I think it is a reasonable request. |
It is not very good practice.
What do you think about that we only specify the |
@zhaoxi1988 , Users can write literal values in a SELECT statement, too. :( It might be possible to write a custom language driver that removes whitespaces. |
I'm sorry for the lack of response. I tried to write a custom language driver, but with the current implementation, it requires a lot of copy & paste. :( |
Have a good idea to construct this function? |
Just a quick point about string literals: they're not necessarily within single quotes ( For example, PostgreSQL can have Dollar-quoted String Constants:
|
Replaced by #1901 |
Remove the blank lines in XML
#1126