@balena/odata-to-abstract-sql
Advanced tools
Comparing version 7.1.1-build-fix-order-by-null-values-63a19d2eaef3df0d7261c626231045a08f7708c6-1 to 7.1.1-build-fix-order-by-null-values-6922f11bf30b31393025cadc323287737b360232-1
@@ -1262,10 +1262,10 @@ "use strict"; | ||
const navigation = this.NavigateResources(resource, extraResource); | ||
if (!query.from.some((from) => ((0, abstract_sql_compiler_1.isTableNode)(from) && from[1] === navigation.resource.tableAlias) || | ||
((0, abstract_sql_compiler_1.isAliasNode)(from) && from[2] === navigation.resource.tableAlias))) { | ||
if (!query.joins.some((join) => { | ||
const from = join[1]; | ||
return (((0, abstract_sql_compiler_1.isTableNode)(from) && from[1] === navigation.resource.tableAlias) || | ||
((0, abstract_sql_compiler_1.isAliasNode)(from) && from[2] === navigation.resource.tableAlias)); | ||
})) { | ||
query.joinResource(this, navigation.resource, joinType, navigation.where); | ||
return navigation.resource; | ||
} | ||
else { | ||
throw new SyntaxError(`Could not navigate resources '${resource.name}' and '${extraResource}'`); | ||
} | ||
return navigation.resource; | ||
} | ||
@@ -1272,0 +1272,0 @@ reset() { |
{ | ||
"name": "@balena/odata-to-abstract-sql", | ||
"version": "7.1.1-build-fix-order-by-null-values-63a19d2eaef3df0d7261c626231045a08f7708c6-1", | ||
"version": "7.1.1-build-fix-order-by-null-values-6922f11bf30b31393025cadc323287737b360232-1", | ||
"description": "A consumer of the OData parser, written in OMeta", | ||
@@ -57,4 +57,4 @@ "type": "commonjs", | ||
"versionist": { | ||
"publishedAt": "2025-02-13T17:02:24.866Z" | ||
"publishedAt": "2025-02-13T18:01:31.555Z" | ||
} | ||
} |
@@ -1825,15 +1825,13 @@ import _ from 'lodash'; | ||
if ( | ||
!query.from.some( | ||
(from) => | ||
!query.joins.some((join) => { | ||
const from = join[1]; | ||
return ( | ||
(isTableNode(from) && from[1] === navigation.resource.tableAlias) || | ||
(isAliasNode(from) && from[2] === navigation.resource.tableAlias), | ||
) | ||
(isAliasNode(from) && from[2] === navigation.resource.tableAlias) | ||
); | ||
}) | ||
) { | ||
query.joinResource(this, navigation.resource, joinType, navigation.where); | ||
return navigation.resource; | ||
} else { | ||
throw new SyntaxError( | ||
`Could not navigate resources '${resource.name}' and '${extraResource}'`, | ||
); | ||
} | ||
return navigation.resource; | ||
} | ||
@@ -1840,0 +1838,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1034933
7332