Skip to content

Commit 8a72c78

Browse files
author
Psilo
committed
adapt README
1 parent 0465c33 commit 8a72c78

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ setParam(stringId, "test")
275275
276276
You may specify a parameter as optional by pre-fixing the database-field name with a question-mark like so:
277277
278-
##### Example 2
278+
##### Example 2 (optional and LIKE)
279279
280280
```java
281281
.getListInterceptor()
@@ -285,7 +285,28 @@ You may specify a parameter as optional by pre-fixing the database-field name wi
285285
286286
Where `scanId` is a numeric mandatory parameter and the rest is checked using the `LIKE` operator but since the parameter `sn` is optional, the usages are as well.
287287
288+
##### Supported Datatypes
288289
290+
```java
291+
"string"
292+
"boolean", "bool"
293+
"integer", "int"
294+
"long", "lng"
295+
"float"
296+
"double", "dbl"
297+
"datetime"
298+
```
299+
300+
##### Example 3 (enums)
301+
302+
```java
303+
.getListInterceptor()
304+
.query("endsOn >= :startOn[datetime] AND ?type = :type[~EventType]")
305+
.build()
306+
```
307+
308+
This will cast the `String` in the parameter `type` to a enumeration `EventType`.
309+
So this works only if you save the String-representation of an enumeration in the database and not the index.
289310
290311
#### Explicit Get-List-Interceptors
291312

0 commit comments

Comments
 (0)