@ronin/compiler 0.11.3-leo-ron-1083-1-experimental-233 → 0.11.3-leo-ron-1083-1-experimental-234
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -5990,9 +5990,9 @@ type NativeRecord = Record<string, unknown> & {
|
|
5990
5990
|
id: string;
|
5991
5991
|
ronin: {
|
5992
5992
|
locked: boolean;
|
5993
|
-
createdAt:
|
5993
|
+
createdAt: string;
|
5994
5994
|
createdBy: string | null;
|
5995
|
-
updatedAt:
|
5995
|
+
updatedAt: string;
|
5996
5996
|
updatedBy: string | null;
|
5997
5997
|
};
|
5998
5998
|
};
|
package/dist/index.js
CHANGED
@@ -1672,22 +1672,31 @@ var Transaction = class {
|
|
1672
1672
|
records: this.formatRows(fields, rows, single)
|
1673
1673
|
};
|
1674
1674
|
if (pageSize && output.records.length > 0) {
|
1675
|
-
if (
|
1676
|
-
|
1677
|
-
|
1675
|
+
if (output.records.length > pageSize) {
|
1676
|
+
if (queryInstructions?.before) {
|
1677
|
+
output.records.shift();
|
1678
|
+
} else {
|
1679
|
+
output.records.pop();
|
1680
|
+
}
|
1681
|
+
const direction = queryInstructions?.before ? "moreBefore" : "moreAfter";
|
1682
|
+
const lastRecord = output.records.at(
|
1683
|
+
direction === "moreAfter" ? -1 : 0
|
1684
|
+
);
|
1678
1685
|
output[direction] = generatePaginationCursor(
|
1679
1686
|
model,
|
1680
1687
|
queryInstructions.orderedBy,
|
1681
|
-
|
1688
|
+
lastRecord
|
1682
1689
|
);
|
1683
1690
|
}
|
1684
|
-
if (
|
1685
|
-
const direction = queryInstructions?.before ? "
|
1686
|
-
const
|
1691
|
+
if (queryInstructions?.before || queryInstructions?.after) {
|
1692
|
+
const direction = queryInstructions?.before ? "moreAfter" : "moreBefore";
|
1693
|
+
const firstRecord = output.records.at(
|
1694
|
+
direction === "moreAfter" ? -1 : 0
|
1695
|
+
);
|
1687
1696
|
output[direction] = generatePaginationCursor(
|
1688
1697
|
model,
|
1689
1698
|
queryInstructions.orderedBy,
|
1690
|
-
|
1699
|
+
firstRecord
|
1691
1700
|
);
|
1692
1701
|
}
|
1693
1702
|
}
|
package/package.json
CHANGED