@dbsp/nql 1.8.1 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -532,8 +532,8 @@ declare class NqlCompiler {
|
|
|
532
532
|
* binding. #213 B2: detection consumes `ctx.lastMutationReturningItems`
|
|
533
533
|
* (alias-aware, positional) — NEVER the collapsed `columns` names — so an
|
|
534
534
|
* alias colliding with a real column (`returning email as name`) is
|
|
535
|
-
*
|
|
536
|
-
* colliding column's type.
|
|
535
|
+
* typed by its physical source column rather than silently mistyped as the
|
|
536
|
+
* colliding output column's type.
|
|
537
537
|
*/
|
|
538
538
|
private buildMutationReturningColumnTypes;
|
|
539
539
|
private compileSingleStatement;
|
package/dist/index.js
CHANGED
|
@@ -1809,7 +1809,7 @@ function recursiveVirtualRelationForBinding(relation, sourceTable, directProject
|
|
|
1809
1809
|
targetColumn: [direction === "up" ? targetKeyColumn : selfRefColumn],
|
|
1810
1810
|
hops: [],
|
|
1811
1811
|
cardinality: "many",
|
|
1812
|
-
relationType: relation.type,
|
|
1812
|
+
...relation.type !== void 0 ? { relationType: relation.type } : {},
|
|
1813
1813
|
recursive: {
|
|
1814
1814
|
direction,
|
|
1815
1815
|
maxDepth: recursiveMaxDepth(relation.recursive) ?? 10,
|
|
@@ -4866,8 +4866,8 @@ var NqlCompiler = class {
|
|
|
4866
4866
|
* binding. #213 B2: detection consumes `ctx.lastMutationReturningItems`
|
|
4867
4867
|
* (alias-aware, positional) — NEVER the collapsed `columns` names — so an
|
|
4868
4868
|
* alias colliding with a real column (`returning email as name`) is
|
|
4869
|
-
*
|
|
4870
|
-
* colliding column's type.
|
|
4869
|
+
* typed by its physical source column rather than silently mistyped as the
|
|
4870
|
+
* colliding output column's type.
|
|
4871
4871
|
*/
|
|
4872
4872
|
buildMutationReturningColumnTypes(table, columns) {
|
|
4873
4873
|
const items = this.ctx.lastMutationReturningItems;
|
|
@@ -4875,7 +4875,11 @@ var NqlCompiler = class {
|
|
|
4875
4875
|
(column, index) => {
|
|
4876
4876
|
const item = items !== void 0 && items !== "star" ? items[index] : void 0;
|
|
4877
4877
|
if (item?.aliased) {
|
|
4878
|
-
|
|
4878
|
+
const typeInfo2 = this.ctx.validator?.getTableColumnType(
|
|
4879
|
+
table,
|
|
4880
|
+
item.source
|
|
4881
|
+
);
|
|
4882
|
+
return typeInfo2 !== void 0 ? { column, typed: typeInfo2 } : { column, untypeable: "unresolvable-source" };
|
|
4879
4883
|
}
|
|
4880
4884
|
const typeInfo = this.ctx.validator?.getTableColumnType(table, column);
|
|
4881
4885
|
return typeInfo !== void 0 ? { column, typed: typeInfo } : { column, untypeable: "unresolvable-source" };
|