remult 0.26.17 → 0.26.18
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/esm/remult-knex/index.js
CHANGED
|
@@ -138,7 +138,10 @@ class KnexEntityDataProvider {
|
|
|
138
138
|
if (x.isServerExpression) {
|
|
139
139
|
}
|
|
140
140
|
else {
|
|
141
|
-
|
|
141
|
+
let name = e.$dbNameOf(x);
|
|
142
|
+
if (x.options.sqlExpression)
|
|
143
|
+
name = this.knex.raw('?? as ' + x.key, [name]);
|
|
144
|
+
cols.push(name);
|
|
142
145
|
colKeys.push(x);
|
|
143
146
|
}
|
|
144
147
|
}
|
package/package.json
CHANGED
package/remult-knex/index.js
CHANGED
|
@@ -229,7 +229,7 @@ var KnexEntityDataProvider = /** @class */ (function () {
|
|
|
229
229
|
};
|
|
230
230
|
KnexEntityDataProvider.prototype.find = function (options) {
|
|
231
231
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
232
|
-
var e, cols, colKeys, _a, _b, x, query, br, r_1, r;
|
|
232
|
+
var e, cols, colKeys, _a, _b, x, name_1, query, br, r_1, r;
|
|
233
233
|
var e_3, _c;
|
|
234
234
|
return tslib_1.__generator(this, function (_d) {
|
|
235
235
|
switch (_d.label) {
|
|
@@ -244,7 +244,10 @@ var KnexEntityDataProvider = /** @class */ (function () {
|
|
|
244
244
|
if (x.isServerExpression) {
|
|
245
245
|
}
|
|
246
246
|
else {
|
|
247
|
-
|
|
247
|
+
name_1 = e.$dbNameOf(x);
|
|
248
|
+
if (x.options.sqlExpression)
|
|
249
|
+
name_1 = this.knex.raw('?? as ' + x.key, [name_1]);
|
|
250
|
+
cols.push(name_1);
|
|
248
251
|
colKeys.push(x);
|
|
249
252
|
}
|
|
250
253
|
}
|