@ronin/compiler 0.8.8-leo-ron-1083-experimental-194 → 0.8.8-leo-ron-1083-experimental-196
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/README.md +7 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -56,13 +56,14 @@ transaction.statements;
|
|
56
56
|
// params: [],
|
57
57
|
// returning: true,
|
58
58
|
// }]
|
59
|
+
```
|
59
60
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
//
|
65
|
-
|
61
|
+
Once the RONIN queries have been compiled down to SQL statements, the statements can be
|
62
|
+
executed and their results can be formatted by the compiler as well:
|
63
|
+
|
64
|
+
```typescript
|
65
|
+
// `rows` are provided by the database engine
|
66
|
+
const results: Array<Result> = transaction.prepareResults(rows);
|
66
67
|
```
|
67
68
|
|
68
69
|
#### Types
|
package/dist/index.d.ts
CHANGED
@@ -6011,7 +6011,7 @@ declare class Transaction {
|
|
6011
6011
|
*/
|
6012
6012
|
private compileQueries;
|
6013
6013
|
private formatRecord;
|
6014
|
-
|
6014
|
+
prepareResults(results: Array<Array<Row>>): Array<Result>;
|
6015
6015
|
}
|
6016
6016
|
|
6017
6017
|
export { type PublicModel as Model, type ModelField, type ModelIndex, type ModelPreset, type ModelTrigger, type Query, type Result, type Statement, Transaction };
|
package/dist/index.js
CHANGED
@@ -1409,7 +1409,7 @@ var Transaction = class {
|
|
1409
1409
|
}
|
1410
1410
|
return expand(formattedRecord);
|
1411
1411
|
}
|
1412
|
-
|
1412
|
+
prepareResults(results) {
|
1413
1413
|
return results.map((result, index) => {
|
1414
1414
|
const query = this.queries.at(-index);
|
1415
1415
|
const { queryModel } = splitQuery(query);
|