Skip to content

Commit f1a3e00

Browse files
committed
Documentation
1 parent 431bc10 commit f1a3e00

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Full documentation is available here:
2727
- [Java Case Expression DSL Documentation](caseExpressions.md)
2828
- [Kotlin Case Expression DSL Documentation](kotlinCaseExpressions.md)
2929

30-
The pull request for this change is
30+
The pull request for this change is ([#761](https://github.com/mybatis/mybatis-dynamic-sql/pull/761))
3131

3232
### Parameter Values in Joins
3333

src/site/markdown/docs/caseExpressions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ A simple case expression checks the values of a single column. It looks like thi
1111

1212
```sql
1313
select case id
14-
when 1, 2, 3 then true
14+
when 1, 2, 3 then true
1515
else false
1616
end as small_id
1717
from foo
@@ -32,8 +32,8 @@ A searched case expression allows arbitrary logic, and it can check the values o
3232

3333
```sql
3434
select case
35-
when animal_name = 'Small brown bat' or animal_name = 'Large brown bat' then 'Bat'
36-
when animal_name = 'Artic fox' or animal_name = 'Red fox' then 'Fox'
35+
when animal_name = 'Small brown bat' or animal_name = 'Large brown bat' then 'Bat'
36+
when animal_name = 'Artic fox' or animal_name = 'Red fox' then 'Fox'
3737
else 'Other'
3838
end as animal_type
3939
from foo
@@ -44,7 +44,7 @@ from foo
4444
The library will always render the "when" part of a case expression using bind variables. Rendering of the "then" and
4545
"else" parts of a case expression may or may not use bind variables depending on how you write the query. In general,
4646
the library will render "then" and "else" as constants - meaning not using bind variables. If you wish to use bind
47-
variables for these parts of a case expressions, then you can use the `value` function to turn a constant into a
47+
variables for these parts of a case expressions, then you can use the `value` function to turn a constant into a
4848
bind variable. We will show examples of the different renderings in the following sections.
4949

5050
If you choose to use bind variables for all "then" and "else" values, it is highly likely that the database will
@@ -186,8 +186,8 @@ statement - so avoid the use of conditions like "isEqualToWhenPresent", etc.
186186
The rendered SQL will be as follows (without the line breaks):
187187
```sql
188188
select case
189-
when animal_name = ? or animal_name = ? then 'Bat'
190-
when animal_name = ? or animal_name = ? then 'Fox'
189+
when animal_name = ? or animal_name = ? then 'Bat'
190+
when animal_name = ? or animal_name = ? then 'Fox'
191191
else 'Other'
192192
end as animal_type
193193
from foo

src/site/markdown/docs/kotlinCaseExpressions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ A simple case expression checks the values of a single column. It looks like thi
1111

1212
```sql
1313
select case id
14-
when 1, 2, 3 then true
14+
when 1, 2, 3 then true
1515
else false
1616
end as small_id
1717
from foo
@@ -32,8 +32,8 @@ A searched case expression allows arbitrary logic, and it can check the values o
3232

3333
```sql
3434
select case
35-
when animal_name = 'Small brown bat' or animal_name = 'Large brown bat' then 'Bat'
36-
when animal_name = 'Artic fox' or animal_name = 'Red fox' then 'Fox'
35+
when animal_name = 'Small brown bat' or animal_name = 'Large brown bat' then 'Bat'
36+
when animal_name = 'Artic fox' or animal_name = 'Red fox' then 'Fox'
3737
else 'Other'
3838
end as animal_type
3939
from foo
@@ -206,8 +206,8 @@ statement - so avoid the use of conditions like "isEqualToWhenPresent", etc.
206206
The rendered SQL will be as follows (without the line breaks):
207207
```sql
208208
select case
209-
when animal_name = ? or animal_name = ? then 'Bat'
210-
when animal_name = ? or animal_name = ? then 'Fox'
209+
when animal_name = ? or animal_name = ? then 'Bat'
210+
when animal_name = ? or animal_name = ? then 'Fox'
211211
else 'Other'
212212
end as animal_type
213213
from foo

0 commit comments

Comments
 (0)