@ronin/compiler 0.11.3 → 0.11.4-leo-ron-1083-2-experimental-236
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 +4 -4
- package/dist/index.js +17 -8
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
@@ -5990,14 +5990,14 @@ 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
|
};
|
5999
|
-
type SingleRecordResult = {
|
6000
|
-
record:
|
5999
|
+
type SingleRecordResult<T = NativeRecord> = {
|
6000
|
+
record: T | null;
|
6001
6001
|
};
|
6002
6002
|
type MultipleRecordResult = {
|
6003
6003
|
records: Array<NativeRecord>;
|
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
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ronin/compiler",
|
3
|
-
"version": "0.11.
|
3
|
+
"version": "0.11.4-leo-ron-1083-2-experimental-236",
|
4
4
|
"type": "module",
|
5
5
|
"description": "Compiles RONIN queries to SQL statements.",
|
6
6
|
"publishConfig": {
|
@@ -33,7 +33,7 @@
|
|
33
33
|
},
|
34
34
|
"devDependencies": {
|
35
35
|
"@biomejs/biome": "1.9.2",
|
36
|
-
"@ronin/engine": "0.0.
|
36
|
+
"@ronin/engine": "0.0.19",
|
37
37
|
"@types/bun": "1.1.10",
|
38
38
|
"@types/title": "3.4.3",
|
39
39
|
"tsup": "8.3.0",
|