Skip to content

json query does not support ! operator #154

@vitalz

Description

@vitalz

Issue occurred for that case:

! - Use to negate a filter: [?(!@.isbn)] matches items that do not have the isbn property. For instance, $.store.book[?(!@.isbn)].

This is one more case:

!= - Not equal to. String values must be enclosed in single quotes.

Parsing error at position 25: Unknown operator: !
com.nhl.link.move.runtime.json.query.ParseException: Parsing error at position 25: Unknown operator: !
	at com.nhl.link.move.runtime.json.query.QueryCompiler$Parser.buildScript(QueryCompiler.java:236)
	at com.nhl.link.move.runtime.json.query.QueryCompiler$Parser.buildPredicate(QueryCompiler.java:202)
	at com.nhl.link.move.runtime.json.query.QueryCompiler$Parser.buildFilter(QueryCompiler.java:179)
	at com.nhl.link.move.runtime.json.query.QueryCompiler$Parser.buildSegment(QueryCompiler.java:85)
	at com.nhl.link.move.runtime.json.query.QueryCompiler$Parser.buildChildOrFilter(QueryCompiler.java:142)
	at com.nhl.link.move.runtime.json.query.QueryCompiler$Parser.buildSegment(QueryCompiler.java:79)
	at com.nhl.link.move.runtime.json.query.QueryCompiler$Parser.buildChildOrFilter(QueryCompiler.java:142)
	at com.nhl.link.move.runtime.json.query.QueryCompiler$Parser.buildSegment(QueryCompiler.java:79)
	at com.nhl.link.move.runtime.json.query.QueryCompiler$Parser.buildQuery(QueryCompiler.java:56)
	at com.nhl.link.move.runtime.json.query.QueryCompiler$Parser.parse(QueryCompiler.java:42)
	at com.nhl.link.move.runtime.json.query.QueryCompiler.compile(QueryCompiler.java:19)
	at com.nhl.link.move.runtime.json.JsonExtractorFactory.getRootQuery(JsonExtractorFactory.java:46)
	at com.nhl.link.move.runtime.json.JsonExtractorFactory.createExtractor(JsonExtractorFactory.java:37)
	at com.nhl.link.move.runtime.json.JsonExtractorFactory.createExtractor(JsonExtractorFactory.java:11)
	at com.nhl.link.move.runtime.extractor.ReloadableExtractor.createExtractor(ReloadableExtractor.java:86)
	at com.nhl.link.move.runtime.extractor.ReloadableExtractor.createExtractor(ReloadableExtractor.java:73)
	at com.nhl.link.move.runtime.extractor.ReloadableExtractor.getDelegate(ReloadableExtractor.java:55)
	at com.nhl.link.move.runtime.extractor.ReloadableExtractor.getReader(ReloadableExtractor.java:42)
	at com.nhl.link.move.runtime.task.createorupdate.CreateOrUpdateTask.getRowReader(CreateOrUpdateTask.java:85)
	at com.nhl.link.move.runtime.task.createorupdate.CreateOrUpdateTask.run(CreateOrUpdateTask.java:59)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions