We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Propose to change set node to allow it trim comma prefix
public class SetSqlNode extends TrimSqlNode { public SetSqlNode(Configuration configuration,SqlNode contents) { super(configuration, contents, "SET", ",", null, ","); } }
Reason: It is natural for users migrated from ibatis to write code like this
UPDATE user <set> <if test="name != null"> name=#{name} </if> <if test="desc != null"> ,desc=#{desc} </if> </set>
Instead of
UPDATE user <set> <if test="name != null"> name=#{name}, </if> <if test="desc != null"> desc=#{desc} </if> </set>
The added feature will not break anything, although may use some cpu cycles and slow down a bit.
The text was updated successfully, but these errors were encountered:
95166a6
I have just committed the fix. Thank you! :D
Sorry, something went wrong.
refs #21 Added 'final' as per Kazuki's suggestion.
783c3a8
fixes mybatis#21 SetSqlNode should remove comma before column name.
ca08042
refs mybatis#21 Added 'final' as per Kazuki's suggestion.
85af37f
harawata
No branches or pull requests
Propose to change set node to allow it trim comma prefix
Reason:
It is natural for users migrated from ibatis to write code like this
Instead of
The added feature will not break anything, although may use some cpu cycles and slow down a bit.
The text was updated successfully, but these errors were encountered: