orange-orm 4.5.3 → 4.5.5
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/docs/changelog.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
## Changelog
|
|
2
|
+
__4.5.5__
|
|
3
|
+
Bugfix: Parameterized queries are case sensitive on SAP ASE . See [#123](https://github.com/alfateam/orange-orm/issues/123)
|
|
4
|
+
__4.5.4__
|
|
5
|
+
Bugfix: hasMany relation through references relation gives empty array . See [#122](https://github.com/alfateam/orange-orm/issues/122)
|
|
2
6
|
__4.5.3__
|
|
3
7
|
Minor improvements of types in aggregate functions.
|
|
4
8
|
__4.5.2__
|
|
5
|
-
Bugfix: Aggregate functions are not allowed on root tables . See [#
|
|
9
|
+
Bugfix: Aggregate functions are not allowed on root tables . See [#121](https://github.com/alfateam/orange-orm/issues/121)
|
|
6
10
|
__4.5.1__
|
|
7
11
|
Bugfix: "Changed by Other User" Error Triggered by Precision Mismatch in Numeric Column. See [#120](https://github.com/alfateam/orange-orm/issues/120)
|
|
8
12
|
__4.5.0__
|
package/package.json
CHANGED
package/src/client/index.mjs
CHANGED
|
@@ -5676,7 +5676,7 @@ function requireNewJoinLeg () {
|
|
|
5676
5676
|
c.expand = relation.expand;
|
|
5677
5677
|
|
|
5678
5678
|
c.accept = function(visitor) {
|
|
5679
|
-
visitor.visitJoin(c);
|
|
5679
|
+
return visitor.visitJoin(c);
|
|
5680
5680
|
};
|
|
5681
5681
|
|
|
5682
5682
|
return c;
|
|
@@ -9853,7 +9853,7 @@ function requireNewManyLeg () {
|
|
|
9853
9853
|
var c = newOneLeg(relation);
|
|
9854
9854
|
c.name = relation.joinRelation.rightAlias;
|
|
9855
9855
|
c.accept = function(visitor) {
|
|
9856
|
-
visitor.visitMany(c);
|
|
9856
|
+
return visitor.visitMany(c);
|
|
9857
9857
|
};
|
|
9858
9858
|
|
|
9859
9859
|
c.expand = relation.expand;
|
package/src/map.d.ts
CHANGED
|
@@ -611,22 +611,28 @@ type AggregateStrategyBase<T> =
|
|
|
611
611
|
where?: (agg: MappedColumnsAndRelations<T>) => RawFilter;
|
|
612
612
|
};
|
|
613
613
|
|
|
614
|
-
|
|
614
|
+
|
|
615
|
+
type FetchingStrategyBase<T, IsMany = true> =
|
|
616
|
+
{
|
|
615
617
|
[K in keyof T &
|
|
616
618
|
keyof RemoveNever<
|
|
617
619
|
AllowedColumnsAndTablesStrategy<T>
|
|
618
620
|
>]?: T[K] extends ColumnSymbols
|
|
619
621
|
? boolean
|
|
620
|
-
: boolean | FetchingStrategyBase<T[K]> | AggType<T[K]>;
|
|
621
|
-
} &
|
|
622
|
+
: boolean | FetchingStrategyBase<T[K], T[K] extends ManyRelation ? true: false> | AggType<T[K]>;
|
|
623
|
+
} &
|
|
624
|
+
(IsMany extends true ? {
|
|
625
|
+
limit?: number;
|
|
626
|
+
offset?: number;
|
|
622
627
|
orderBy?:
|
|
623
628
|
| OrderBy<Extract<keyof AllowedColumns<T>, string>>[]
|
|
624
629
|
| OrderBy<Extract<keyof AllowedColumns<T>, string>>;
|
|
625
|
-
limit?: number;
|
|
626
|
-
offset?: number;
|
|
627
630
|
where?: (agg: MappedColumnsAndRelations<T>) => RawFilter;
|
|
631
|
+
}
|
|
632
|
+
: {
|
|
633
|
+
where?: (agg: MappedColumnsAndRelations<T>) => RawFilter;
|
|
634
|
+
});
|
|
628
635
|
|
|
629
|
-
};
|
|
630
636
|
type ExtractAggregates<Agg> = {
|
|
631
637
|
[K in keyof Agg as
|
|
632
638
|
Required<Agg>[K] extends (agg: Aggregate<infer V>) => ColumnSymbols
|
package/src/mssql/wrapQuery.js
CHANGED
|
@@ -8,6 +8,12 @@ function wrapQuery(connection) {
|
|
|
8
8
|
var params = query.parameters;
|
|
9
9
|
var sql = query.sql();
|
|
10
10
|
log.emitQuery({ sql, parameters: params });
|
|
11
|
+
const sap = connection.msnodesqlv8;
|
|
12
|
+
for (let i = 0; i < params.length; i++) {
|
|
13
|
+
const parameter = params[i];
|
|
14
|
+
if (typeof parameter === 'string')
|
|
15
|
+
params[i] = sap.VarChar(parameter);
|
|
16
|
+
}
|
|
11
17
|
|
|
12
18
|
runOriginalQuery.call(connection, sql, params, onInnerCompleted);
|
|
13
19
|
let result = [];
|