0.0.20 • Published 3 years ago

@tjc-group/odata-v2-parser v0.0.20

Weekly downloads
65
License
MIT
Repository
github
Last release
3 years ago

OData v2 Parser

This package is a kind of a downgrade from odata-v4-parser of JayStack. The goal is to provide OData uri parser capable of parsing OData V2 requests and working together with @tjc-group/odata-v2-server.

Currently implemented: -- support for V2 inline count ($inlinecount=allpages) -- support for nested navigation property path in $expand clause

Should also parse OData V4 requests

Usage

var parser = require('@tjc-group/odata-v2-parser');

Below is the original JayStack README:

OData v4 Parser

OData v4 parser based on OASIS Standard OData v4 ABNF grammar

How to build

Simply just use $ npm run build

Run TDD tests using $ npm run tdd

How to use

Parser functions:

var parser = require('odata-v4-parser');
parser.filter("Title eq 'Article1'");

Low-level functional:

require('odata-v4-parser/lib/expressions').boolCommonExpr(new Uint8Array(new Buffer("contains(@word,Title)")), 0);
require('odata-v4-parser/lib/json').arrayOrObject(new Uint8Array(new Buffer('{"a":1}')), 0);
require('odata-v4-parser/lib/expressions').commonExpr(new Uint8Array(new Buffer('Items/all(d:d/Quantity gt 100)')), 0);

TODO

  • more unit testing
  • use metadata for correct OData identifier type detection (complex types, navigation properties, etc.)
0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.14

4 years ago

0.0.15

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago