@@ -11,7 +11,7 @@ A simple case expression checks the values of a single column. It looks like thi
1111
1212``` sql
1313select case id
14- when 1 , 2 , 3 then true
14+ when 1 , 2 , 3 then true
1515 else false
1616 end as small_id
1717from foo
@@ -32,8 +32,8 @@ A searched case expression allows arbitrary logic, and it can check the values o
3232
3333``` sql
3434select 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
3939from foo
@@ -44,7 +44,7 @@ from foo
4444The 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,
4646the 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
4848bind variable. We will show examples of the different renderings in the following sections.
4949
5050If 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.
186186The rendered SQL will be as follows (without the line breaks):
187187``` sql
188188select 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
193193from foo
0 commit comments