Skip to content

Commit ca77815

Browse files
authored
Merge pull request #2 from ferjm/count
[Issue #1] Allow parsing SensorThings count
2 parents 4f1e1a6 + 201cd18 commit ca77815

File tree

2 files changed

+327
-314
lines changed

2 files changed

+327
-314
lines changed

src/odata.pegjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,10 @@ expandList = i:identifierPath list:("," WSP? l:expandList {re
213213
return list;
214214
}
215215

216-
//$skip
216+
// $count
217+
count = "$count=" a:boolean { return { '$count': a }; }
218+
/ "$count=" .* { return {"error": 'invalid $count parameter'}; }
219+
// $skip
217220
skip = "$skip=" a:INT {return {'$skip': ~~a }; }
218221
/ "$skip=" .* { return {"error": 'invalid $skip parameter'}; }
219222

@@ -396,6 +399,7 @@ exp =
396399
inlinecount /
397400
select /
398401
callback /
402+
count /
399403
unsupported
400404

401405
query = list:expList {

0 commit comments

Comments
 (0)