@balena/odata-to-abstract-sql
Advanced tools
Comparing version 7.1.1-build-fix-order-by-null-values-6922f11bf30b31393025cadc323287737b360232-1 to 7.1.1-build-fix-order-by-null-values-8357d6e1ff24bb3320b92773258a82b51d000b5a-1
{ | ||
"name": "@balena/odata-to-abstract-sql", | ||
"version": "7.1.1-build-fix-order-by-null-values-6922f11bf30b31393025cadc323287737b360232-1", | ||
"version": "7.1.1-build-fix-order-by-null-values-8357d6e1ff24bb3320b92773258a82b51d000b5a-1", | ||
"description": "A consumer of the OData parser, written in OMeta", | ||
@@ -57,4 +57,4 @@ "type": "commonjs", | ||
"versionist": { | ||
"publishedAt": "2025-02-13T18:01:31.555Z" | ||
"publishedAt": "2025-02-17T13:03:41.519Z" | ||
} | ||
} |
@@ -338,19 +338,2 @@ import _ from 'lodash'; | ||
} | ||
// addJoin( | ||
// odataToAbstractSql: OData2AbstractSQL, | ||
// type: JoinType, | ||
// resource: AliasedResource, | ||
// condition: BooleanTypeNodes, | ||
// ): void { | ||
// const tableRef = odataToAbstractSql.getTableReference( | ||
// resource, | ||
// odataToAbstractSql.extraBindVars, | ||
// odataToAbstractSql.bindVarsLength, | ||
// undefined, | ||
// resource.tableAlias, | ||
// undefined, | ||
// ); | ||
// const joinNode: JoinTypeNodes = [type, tableRef, ['On', condition]]; | ||
// this.joins.push(joinNode); | ||
// } | ||
} | ||
@@ -1813,5 +1796,2 @@ | ||
} | ||
// if (nextProp?.args) { | ||
// this.AddJoins(query, parentResource, prop.args); | ||
// } | ||
} | ||
@@ -1818,0 +1798,0 @@ } |
@@ -226,1 +226,21 @@ import { expect } from 'chai'; | ||
}); | ||
test('/pilot?$orderby=licence/name asc,licence/id asc', (result) => { | ||
it('should order teams by licence/name asc and licence/id asc', () => { | ||
expect(result) | ||
.to.be.a.query.that.selects(pilotFields) | ||
.from('pilot') | ||
.leftJoin([ | ||
['licence', 'pilot.licence'], | ||
[ | ||
'Equals', | ||
['ReferencedField', 'pilot', 'licence'], | ||
['ReferencedField', 'pilot.licence', 'id'], | ||
], | ||
]) | ||
.orderby( | ||
['ASC', operandToAbstractSQL('licence/name')], | ||
['ASC', operandToAbstractSQL('licence/id')], | ||
); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1034873
7331