Skip to content

Commit 642ab7e

Browse files
jfelicianirgwozdz
andauthored
Fix issue with object id queries (#1073)
* 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 <rgwozdz@esri.com>
1 parent e665549 commit 642ab7e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/smart-keys-prove.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@koopjs/winnow": patch
3+
---
4+
5+
Fix issue with object id queries

packages/winnow/src/sql-query-builder/where-builder/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const timestampWithoutZoneRegex = /^\d{4}-\d{2}-\d{2} {0,1}\d{0,2}:{0,1}\d{0,2}:
88
const fieldFirstObjectIdPredicateRegex =
99
/(properties|attributes)->`OBJECTID` (=|<|>|<=|>=) ([0-9]+)/g;
1010

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

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

0 commit comments

Comments
 (0)