@@ -72,7 +72,7 @@ A simple case expression can be coded like the following in the Kotlin DSL:
7272
7373``` kotlin
7474select(case(id) {
75- `when `(1 , 2 , 3 ) { then( true ) }
75+ `when `(1 , 2 , 3 ) then true
7676 `else `(false )
7777 } `as ` " small_id"
7878) {
@@ -91,7 +91,7 @@ you can write the query as follows:
9191
9292``` kotlin
9393select(case(id) {
94- `when `(1 , 2 , 3 ) { then( value(true )) }
94+ `when `(1 , 2 , 3 ) then value(true )
9595 `else `(value(false ))
9696 } `as ` " small_id"
9797) {
@@ -111,7 +111,7 @@ expected data type. Here's an example of using the `cast` function:
111111
112112``` kotlin
113113select(case(id) {
114- `when `(1 , 2 , 3 ) { then( value(true )) }
114+ `when `(1 , 2 , 3 ) then value(true )
115115 `else `(cast { value(false ) `as ` " BOOLEAN" })
116116 } `as ` " small_id"
117117) {
@@ -134,8 +134,8 @@ A simple case expression can be coded like the following in the Kotlin DSL:
134134
135135``` kotlin
136136select(case(total_length) {
137- `when `(isLessThan(10 )) { then( " small" ) }
138- `when `(isGreaterThan(20 )) { then( " large" ) }
137+ `when `(isLessThan(10 )) then " small"
138+ `when `(isGreaterThan(20 )) then " large"
139139 `else `(" medium" )
140140 } `as ` " tshirt_size"
141141) {
@@ -158,8 +158,8 @@ VARCHAR, you can use the `cast` function as follows:
158158
159159``` kotlin
160160select(case(total_length) {
161- `when `(isLessThan(10 )) { then( " small" ) }
162- `when `(isGreaterThan(20 )) { then( " large" ) }
161+ `when `(isLessThan(10 )) then " small"
162+ `when `(isGreaterThan(20 )) then " large"
163163 `else `(cast { " medium" `as ` " VARCHAR(6)" })
164164 } `as ` " tshirt_size"
165165) {
0 commit comments