@balena/odata-to-abstract-sql
Advanced tools
Comparing version 5.2.0 to 5.3.0-export-is-bind-reference-4aa9b4f62f0ae20c250425f30c41f1c4c5117892
@@ -7,2 +7,6 @@ # Change Log | ||
## 5.3.0 - 2020-07-21 | ||
* Export `isBindReference` [Pagan Gazzard] | ||
## 5.2.0 - 2020-07-20 | ||
@@ -9,0 +13,0 @@ |
@@ -45,2 +45,5 @@ import * as _ from 'lodash'; | ||
export declare const rewriteBinds: (definition: NonNullable<Resource['definition']>, existingBinds: ODataBinds, inc?: number) => void; | ||
export declare const isBindReference: (maybeBind: { | ||
[key: string]: unknown; | ||
}) => maybeBind is BindReference; | ||
export declare class OData2AbstractSQL { | ||
@@ -47,0 +50,0 @@ private clientModel; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.OData2AbstractSQL = exports.rewriteBinds = exports.odataNameToSqlName = exports.sqlNameToODataName = void 0; | ||
exports.OData2AbstractSQL = exports.isBindReference = exports.rewriteBinds = exports.odataNameToSqlName = exports.sqlNameToODataName = void 0; | ||
const _ = require("lodash"); | ||
@@ -111,3 +111,3 @@ const memoize = require("memoizee"); | ||
}; | ||
const isBindReference = (maybeBind) => { | ||
exports.isBindReference = (maybeBind) => { | ||
return (maybeBind != null && | ||
@@ -282,3 +282,3 @@ 'bind' in maybeBind && | ||
if (path.link.key != null) { | ||
if (isBindReference(path.link.key)) { | ||
if (exports.isBindReference(path.link.key)) { | ||
query.where.push([ | ||
@@ -416,3 +416,3 @@ comparison.eq, | ||
if (method === 'PUT' || method === 'PUT-INSERT' || method === 'POST') { | ||
if (isBindReference(key)) { | ||
if (exports.isBindReference(key)) { | ||
addBodyKey(resource.resourceName, resource.idField, key, bodyKeys, this.extraBodyVars); | ||
@@ -426,3 +426,3 @@ } | ||
} | ||
if (isBindReference(key)) { | ||
if (exports.isBindReference(key)) { | ||
const bind = this.Bind(key); | ||
@@ -466,3 +466,3 @@ const referencedField = [ | ||
Bind(bind, optional = false) { | ||
if (isBindReference(bind)) { | ||
if (exports.isBindReference(bind)) { | ||
return ['Bind', bind.bind]; | ||
@@ -469,0 +469,0 @@ } |
{ | ||
"name": "@balena/odata-to-abstract-sql", | ||
"version": "5.2.0", | ||
"version": "5.3.0-export-is-bind-reference-4aa9b4f62f0ae20c250425f30c41f1c4c5117892", | ||
"description": "A consumer of the OData parser, written in OMeta", | ||
@@ -5,0 +5,0 @@ "main": "out/odata-to-abstract-sql.js", |
@@ -222,3 +222,3 @@ import * as _ from 'lodash'; | ||
const isBindReference = (maybeBind: { | ||
export const isBindReference = (maybeBind: { | ||
[key: string]: unknown; | ||
@@ -225,0 +225,0 @@ }): maybeBind is BindReference => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
381464
2938
2