0.5.1 • Published 6 years ago

oo-odata-query v0.5.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

oo-odata-query

This library provides an object oriented method of building OData queries.

Installation

Install via npm

npm install oo-odata-query

Documentation

Examples

Select

The Select class is used to select specific fields. For example,

new Query({
  select: new Select(['id', 'name', 'age'])
}).toString();

returns

'$select=id,name,age'

Expand

The Expand class expands children. For example,

new Query({
  expand: new Expand()
}).toString();

returns

'$expand=address'

and

new Query({
  expand: new Expand([
    new Expansion(
      'contact',
      new Query({
        select: new Select(['id', 'name'])
      })
    )
  ])
).toString();

returns

'$expand=contact($select=id,name)'
0.5.1

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago