odata-query
Advanced tools
Comparing version 5.4.1 to 5.4.2
@@ -201,4 +201,12 @@ 'use strict'; | ||
} else if (op === 'in') { | ||
var resultingValues = Array.isArray(value[op]) | ||
// Convert `{ Prop: { in: [1,2,3] } }` to `(Prop eq 1 or Prop eq 2 or Prop eq 3)` | ||
result.push('(' + value[op].map(function (v) { | ||
? value[op] | ||
// Convert `{ Prop: { in: [{type: type, value: 1},{type: type, value: 2},{type: type, value: 3}] } }` | ||
// to `(Prop eq 1 or Prop eq 2 or Prop eq 3)` | ||
: value[op].value.map(function (typedValue) { | ||
return { 'type': value[op].type, 'value': typedValue }; | ||
}); | ||
result.push('(' + resultingValues.map(function (v) { | ||
return propName + ' eq ' + handleValue(v); | ||
@@ -205,0 +213,0 @@ }).join(' or ') + ')'); |
{ | ||
"name": "odata-query", | ||
"version": "5.4.1", | ||
"version": "5.4.2", | ||
"author": "Sean Lynch <techniq35@gmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -209,3 +209,3 @@ # odata-query | ||
```js | ||
const filter = { "someProp": { eq: { cast: 'guid', value: 'cd5977c2-4a64-42de-b2fc-7fe4707c65cd' } }; | ||
const filter = { "someProp": { eq: { type: 'guid', value: 'cd5977c2-4a64-42de-b2fc-7fe4707c65cd' } } }; | ||
buildQuery({ filter }) | ||
@@ -212,0 +212,0 @@ => "?$filter=someProp eq cd5977c2-4a64-42de-b2fc-7fe4707c65cd" |
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
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
28016
354