File tree Expand file tree Collapse file tree 5 files changed +55
-50
lines changed Expand file tree Collapse file tree 5 files changed +55
-50
lines changed Original file line number Diff line number Diff line change @@ -159,16 +159,17 @@ AND title like ‘someTitle’]]></source>
159
159
</subsection >
160
160
<subsection name =" script" >
161
161
<p >For using dynamic SQL in annotated mapper class, <em >script</em > element can be used. For example:</p >
162
- <source ><![CDATA[ @Update(
163
- "<script>update Author",
164
- " <set>",
165
- " <if test="username != null">username=#{username},</if>",
166
- " <if test="password != null">password=#{password},</if>",
167
- " <if test="email != null">email=#{email},</if>",
168
- " <if test="bio != null">bio=#{bio}</if>",
169
- " </set>",
170
- "where id=#{id}",
171
- "</script>")
162
+ <source ><![CDATA[
163
+ @Update({"<script>",
164
+ "update Author",
165
+ " <set>",
166
+ " <if test='username != null'>username=#{username},</if>",
167
+ " <if test='password != null'>password=#{password},</if>",
168
+ " <if test='email != null'>email=#{email},</if>",
169
+ " <if test='bio != null'>bio=#{bio}</if>",
170
+ " </set>",
171
+ "where id=#{id}",
172
+ "</script>"})
172
173
void updateAuthorValues(Author author);]]> </source >
173
174
</subsection >
174
175
<subsection name =" bind" >
Original file line number Diff line number Diff line change @@ -165,16 +165,17 @@ AND title like ‘someTitle’]]></source>
165
165
</subsection >
166
166
<subsection name =" script" >
167
167
<p >For using dynamic SQL in annotated mapper class, <em >script</em > element can be used. For example:</p >
168
- <source ><![CDATA[ @Update(
169
- "<script>update Author",
170
- " <set>",
171
- " <if test="username != null">username=#{username},</if>",
172
- " <if test="password != null">password=#{password},</if>",
173
- " <if test="email != null">email=#{email},</if>",
174
- " <if test="bio != null">bio=#{bio}</if>",
175
- " </set>",
176
- "where id=#{id}",
177
- "</script>")
168
+ <source ><![CDATA[
169
+ @Update({"<script>",
170
+ "update Author",
171
+ " <set>",
172
+ " <if test='username != null'>username=#{username},</if>",
173
+ " <if test='password != null'>password=#{password},</if>",
174
+ " <if test='email != null'>email=#{email},</if>",
175
+ " <if test='bio != null'>bio=#{bio}</if>",
176
+ " </set>",
177
+ "where id=#{id}",
178
+ "</script>"})
178
179
void updateAuthorValues(Author author);]]> </source >
179
180
</subsection >
180
181
<subsection name =" bind" >
Original file line number Diff line number Diff line change @@ -190,16 +190,17 @@ AND title like ‘someTitle’]]></source>
190
190
</subsection >
191
191
<subsection name =" script" >
192
192
<p >For using dynamic SQL in annotated mapper class, <em >script</em > element can be used. For example:</p >
193
- <source ><![CDATA[ @Update(
194
- "<script>update Author",
195
- " <set>",
196
- " <if test="username != null">username=#{username},</if>",
197
- " <if test="password != null">password=#{password},</if>",
198
- " <if test="email != null">email=#{email},</if>",
199
- " <if test="bio != null">bio=#{bio}</if>",
200
- " </set>",
201
- "where id=#{id}",
202
- "</script>")
193
+ <source ><![CDATA[
194
+ @Update({"<script>",
195
+ "update Author",
196
+ " <set>",
197
+ " <if test='username != null'>username=#{username},</if>",
198
+ " <if test='password != null'>password=#{password},</if>",
199
+ " <if test='email != null'>email=#{email},</if>",
200
+ " <if test='bio != null'>bio=#{bio}</if>",
201
+ " </set>",
202
+ "where id=#{id}",
203
+ "</script>"})
203
204
void updateAuthorValues(Author author);]]> </source >
204
205
</subsection >
205
206
<subsection name =" bind" >
Original file line number Diff line number Diff line change @@ -158,16 +158,17 @@ AND title like ‘someTitle’]]></source>
158
158
</subsection >
159
159
<subsection name =" script" >
160
160
<p >For using dynamic SQL in annotated mapper class, <em >script</em > element can be used. For example:</p >
161
- <source ><![CDATA[ @Update(
162
- "<script>update Author",
163
- " <set>",
164
- " <if test="username != null">username=#{username},</if>",
165
- " <if test="password != null">password=#{password},</if>",
166
- " <if test="email != null">email=#{email},</if>",
167
- " <if test="bio != null">bio=#{bio}</if>",
168
- " </set>",
169
- "where id=#{id}",
170
- "</script>")
161
+ <source ><![CDATA[
162
+ @Update({"<script>",
163
+ "update Author",
164
+ " <set>",
165
+ " <if test='username != null'>username=#{username},</if>",
166
+ " <if test='password != null'>password=#{password},</if>",
167
+ " <if test='email != null'>email=#{email},</if>",
168
+ " <if test='bio != null'>bio=#{bio}</if>",
169
+ " </set>",
170
+ "where id=#{id}",
171
+ "</script>"})
171
172
void updateAuthorValues(Author author);]]> </source >
172
173
</subsection >
173
174
<subsection name =" bind" >
Original file line number Diff line number Diff line change @@ -162,16 +162,17 @@ AND title like ‘someTitle’]]></source>
162
162
</subsection >
163
163
<subsection name =" script" >
164
164
<p >For using dynamic SQL in annotated mapper class, <em >script</em > element can be used. For example:</p >
165
- <source ><![CDATA[ @Update(
166
- "<script>update Author",
167
- " <set>",
168
- " <if test="username != null">username=#{username},</if>",
169
- " <if test="password != null">password=#{password},</if>",
170
- " <if test="email != null">email=#{email},</if>",
171
- " <if test="bio != null">bio=#{bio}</if>",
172
- " </set>",
173
- "where id=#{id}",
174
- "</script>")
165
+ <source ><![CDATA[
166
+ @Update({"<script>",
167
+ "update Author",
168
+ " <set>",
169
+ " <if test='username != null'>username=#{username},</if>",
170
+ " <if test='password != null'>password=#{password},</if>",
171
+ " <if test='email != null'>email=#{email},</if>",
172
+ " <if test='bio != null'>bio=#{bio}</if>",
173
+ " </set>",
174
+ "where id=#{id}",
175
+ "</script>"})
175
176
void updateAuthorValues(Author author);]]> </source >
176
177
</subsection >
177
178
<subsection name =" bind" >
You can’t perform that action at this time.
0 commit comments