Const tests
tests: object
should allow any character except '"' between double quotes
should allow any character except '"' between double quotes: object
input
input: string = "type:"%><>?:L^#@!@#%^&p:%'for long'!@<=a:%22>=<>#\$%^&{()'`f`\""
should allow grouping (complex)
should allow grouping (complex): object
input
input: string = "(type:"P" , name:"Sargent") and (type:"P" or name:"Sa")"
should allow grouping (single)
should allow grouping (single): object
input
input: string = "(type:"P")"
should allow grouping (two with AND)
should allow grouping (two with AND): object
input
input: string = "(type:"P" AND name:"Sargent")"
should allow grouping (two with OR)
should allow grouping (two with OR): object
input
input: string = "(type:"P" OR name:"Sargent")"
should allow grouping (two with commas)
should allow grouping (two with commas): object
input
input: string = "(type:"P" , name:"Sargent")"
should allow use of pipes in place of or
should allow use of pipes in place of or: object
input
input: string = "(type:"P" | name:"Sargent")"
should not be thrown off by extra whitespace
should not be thrown off by extra whitespace: object
input
input: string = "type: "P", name: "Sargent", date_of_birth: 1990-07-12"
should parse ((<filter>) <and> (<filter>,<filter>,<filter>))
should parse ((<filter>) <and> (<filter>,<filter>,<filter>)): object
input
input: string = `((type:"P") and (name:"Rakim",date_of_birth:1968-01-28T00:00:00.000Z,trini_national_id:"1968012875"))`
should parse (<filter> <op> <filter> op <filter>_
should parse (<filter> <op> <filter> op <filter>_: object
input
input: string = "(id:1 or id:2 or id:3)"
should parse (<filter>) <and> (<filter>,<filter>,<filter>)
should parse (<filter>) <and> (<filter>,<filter>,<filter>): object
input
input: string = '(type:"P") and ' +'(name:"Rakim",date_of_birth:1968-01-28T00:00:00.000Z,' +'trini_national_id:"1968012875")'
should parse (<filter>) <op> (<filter>)
should parse (<filter>) <op> (<filter>): object
input
input: string = "(id: in [12,5]),(id:=12)"
should parse (<filter>) <op> (<filter>) op (<filter>)
should parse (<filter>) <op> (<filter>) op (<filter>): object
input
input: string = "(last_updated_on:>=2019-12-19),(created_on:>=2019-12-19),(created_on:<=2020-02-19)"
should parse <filter> <op> <filter> op <filter>
should parse <filter> <op> <filter> op <filter>: object
input
input: string = "id:1 or id:2 or id:3"
should parse a single filter
should parse a single filter: object
input
input: string = "type:c"
should parse a single filter in parens
should parse a single filter in parens: object
input
input: string = "(id: [12,20])"
should parse date literals
should parse date literals: object
input
input: string = "dob:2009-04-03"
should parse date time (Local)
should parse date time (Local): object
input
input: string = "created_on:1989-07-23T23:00:00"
should parse date time (UTC)
should parse date time (UTC): object
input
input: string = "created_on:1989-07-23T23:00:00Z"
should parse date time (hours only UTC)
should parse date time (hours only UTC): object
input
input: string = "created_on:1989-07-23T23Z"
should parse date time (hours only local)
should parse date time (hours only local): object
input
input: string = "created_on:1989-07-23T23"
should parse date time (hours only with offset)
should parse date time (hours only with offset): object
input
input: string = "created_on:1989-07-23T23+09:00"
should parse date time (minutes UTC)
should parse date time (minutes UTC): object
input
input: string = "created_on:1989-07-23T23:00Z"
should parse date time (minutes local)
should parse date time (minutes local): object
input
input: string = "created_on:1989-07-23T23:00"
should parse date time (minutes with offset)
should parse date time (minutes with offset): object
input
input: string = "created_on:1989-07-23T23:00-04:00"
should parse date time (seconds UTC)
should parse date time (seconds UTC): object
input
input: string = "created_on:1989-07-23T23:00:24Z"
should parse date time (seconds local)
should parse date time (seconds local): object
input
input: string = "created_on:1989-07-23T23:00:01"
should parse date time (seconds with fraction UTC)
should parse date time (seconds with fraction UTC): object
input
input: string = "created_on:1989-07-23T23:00:24.555Z"
should parse date time (seconds with fraction and offset)
should parse date time (seconds with fraction and offset): object
input
input: string = "created_on:1989-07-23T23:00:24.555-04:00"
should parse date time (seconds with fraction local)
should parse date time (seconds with fraction local): object
input
input: string = "created_on:1989-07-23T23:00:01.555"
should parse date time (seconds with offset)
should parse date time (seconds with offset): object
input
input: string = "created_on:1989-07-23T23:00-04:00"
should parse date time (with offset)
should parse date time (with offset): object
input
input: string = "created_on:1989-07-23T23:00:00+09:00"
should parse dates
should parse dates: object
input
input: string = "created_on:1989-07-23"
should parse dots
should parse dots: object
input
input: string = "user.username:"faro""
should parse in
should parse in: object
input
input: string = "id: in [1,2,3,4,5,12]"
should parse not in
should parse not in: object
input
input: string = "id: !in [1,2,3,4,5,12]"
should parse three filters
should parse three filters: object
input
input: string = "type:c name:johan active:false"
should parse two filters
should parse two filters: object
input
input: string = "type:c name:johan"
should parse with all basic operators
should parse with all basic operators: object
input
input: string = "age:>14 rank:<23 price:>=22.40 discount:<=5.40 name:"Product name""
should parse with the OR operator
should parse with the OR operator: object
input
input: string = "tag:old OR tag:new"
should parse with the OR operator continued
should parse with the OR operator continued: object
input
input: string = "tag:old OR tag:new OR user:grandma OR filetype:jpeg"
tests