odata-query-builder
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "odata-query-builder", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "An eloquently fluent OData query builder.", | ||
@@ -25,2 +25,5 @@ "main": "dist/index.js", | ||
"fluent api", | ||
"angular 8", | ||
"angular 7", | ||
"angular 6", | ||
"angular 5", | ||
@@ -39,3 +42,5 @@ "angular 2", | ||
"@types/jest": "^23.3.1", | ||
"@types/lodash": "^4.14.116", | ||
"@types/lodash": "^4.14.149", | ||
"@types/lodash.orderby": "^4.6.6", | ||
"@types/node": "^13.1.6", | ||
"awesome-typescript-loader": "^5.2.0", | ||
@@ -45,3 +50,3 @@ "dts-bundle": "^0.7.3", | ||
"jest": "^23.4.2", | ||
"lodash": "^4.17.10", | ||
"lodash.orderby": "^4.6.0", | ||
"source-map-loader": "^0.2.3", | ||
@@ -48,0 +53,0 @@ "ts-jest": "^23.0.1", |
@@ -25,2 +25,3 @@ # odata-query-builder | ||
.filter(f => f.filterExpression('Property', 'eq', 'MyValue')) | ||
.select('My Properties') | ||
.toQuery() | ||
@@ -27,0 +28,0 @@ ``` |
@@ -8,2 +8,3 @@ export enum FragmentType { | ||
Filter = 6, | ||
Select = 7 | ||
} |
@@ -27,2 +27,7 @@ import { QueryBuilder } from './queryBuilder'; | ||
}); | ||
it('should return select', () => { | ||
expect(new QueryBuilder().select('test').toQuery()).toEqual( | ||
'?$select=test' | ||
) | ||
}); | ||
it('should add a new filter expression', () => { | ||
@@ -29,0 +34,0 @@ const testCases = new TestCaseCollection([ |
@@ -1,6 +0,6 @@ | ||
import { orderBy } from 'lodash'; | ||
import { FragmentType } from './enums'; | ||
import { QueryFragment } from './queryFragment'; | ||
const orderBy = require('lodash.orderby'); | ||
type filterExpressionType = string | number | boolean | Date; | ||
@@ -74,2 +74,6 @@ | ||
}; | ||
select = (fields: string) => { | ||
this.fragments.push(new QueryFragment(FragmentType.Select, `$select=${fields}`)); | ||
return this; | ||
}; | ||
@@ -76,0 +80,0 @@ filter = (predicate: (filter: FilterBuilder) => FilterBuilder, operator: string = 'and') => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8578
134
310238
15
16
1