-
Notifications
You must be signed in to change notification settings - Fork 0
Extendable Query Language
See test Demo.java, where demonstrated possibilities.
125 125.2
'string'
* miltiple 2 * 2 4
/ divide 4 / 2 2
% remainder of integer division 3 % 2 1
+ plus 1 + 2 3
- minus 1 - 2 -1
= equal 1 = 2 false
!= not equal 1 != 2 true
> great 2 > 1 true
>= great or equal 2 >= 2 true
< less 1 < 2 true
<= less or equal 2 <= 2 true
, add to list 1, 2 [1,2]
in is in list 2 in (1,2,3) true
.stepOne.stepTwo
If exists map where present key 'stepOne', then in first step while you get value for this key. If on previous step returned map which contain key 'stepTwo' - you getting value for key 'stepTwo'.
data: {stepOne: {stepTwo: 2}}
formula: .stepOne.stepTwo
You will get 2
data: [{stepOne: {stepTwo: 2}, {stepOne: {stepTwo: 3}]
formula: .stepOne.stepTwo
You will get array [2, 3]
.stepOne(.stepTwo = 2)
If exists collection of the map and map contain key 'stepOne', and value of 'stepOne' is a map with existing key 'stepTwo', you will get only the map-object, witch contain value of 'stepTwo' == 2.
data: [ { stepOne: { stepTwo: 2 }, { stepOne: { stepTwo: 3 } ]
formula: .stepOne(.stepTwo = 2)
You will get: {stepOne: {stepTwo: 2}}
In a filter you can use any operations and any functions.
Functions can contain parameters or be without parameters. If function has no parameters then you do not need specify brackets.
With parameters
count(.num)
Without parameters
isFirstRow
null
, true
, false
- this is a functions without parameters.
Different data source can understand different functions.
You can specify own functions - see below.
Function name is not case sensitive. You can write Null
or nUll
or NULL
- it's all the same function.
- Home
- Extendable Query Language
- Computing
- Simple Usage
- Own Value Extraction
- Functions
- What is Type
- Known Types
- Add Own Type
- Data conversion
- Generate SQL Query
- Find files