Skip to content

Commit

Permalink
Fix issue with object id queries (#1073)
Browse files Browse the repository at this point in the history
* Fix issue with object id queries

This resolves an issue where filtering for object ids using the objectIds query parameter with a layer definition applied that also filters for object ids doesn't return the expected results.

* Create smart-keys-prove.md

---------

Co-authored-by: Rich Gwozdz <[email protected]>
  • Loading branch information
Jake13f and rgwozdz authored Aug 12, 2024
1 parent e665549 commit 642ab7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/smart-keys-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@koopjs/winnow": patch
---

Fix issue with object id queries
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const timestampWithoutZoneRegex = /^\d{4}-\d{2}-\d{2} {0,1}\d{0,2}:{0,1}\d{0,2}:
const fieldFirstObjectIdPredicateRegex =
/(properties|attributes)->`OBJECTID` (=|<|>|<=|>=) ([0-9]+)/g;

const objectidInPredicateRegex = /(properties|attributes)->`OBJECTID` (IN) \((.+)\)/g;
const objectidInPredicateRegex = /(properties|attributes)->`OBJECTID` (IN) \(([0-9,\s]+)\)/g;

// RegExp for value-first predicate, e.g "1234 = properties->`OBJECTID`""
const valueFirstObjectIdPredicateRegex =
Expand Down

0 comments on commit 642ab7e

Please sign in to comment.