@ronin/compiler 0.17.8-leo-ron-1099-experimental-395 → 0.17.8-leo-ron-1099-experimental-396
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 +13 -0
- package/dist/index.js +13 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -430,6 +430,19 @@ declare class Transaction {
|
|
430
430
|
statements: Array<Statement>;
|
431
431
|
models: Array<Model>;
|
432
432
|
constructor(queries: Array<Query>, options?: TransactionOptions);
|
433
|
+
/**
|
434
|
+
* Formats an individual result of a query (each query has one individual result).
|
435
|
+
*
|
436
|
+
* @param queryType - The type of query that is being executed.
|
437
|
+
* @param queryInstructions - The instructions if the query that is being executed.
|
438
|
+
* @param model - The model for which the query is being executed.
|
439
|
+
* @param rows - The rows that were returned from the database for the query (in the
|
440
|
+
* form of an array containing arrays that contain strings).
|
441
|
+
* @param selectedFields - The model fields that were selected by the query.
|
442
|
+
* @param single - Whether a single or multiple records are being affected by the query.
|
443
|
+
*
|
444
|
+
* @returns A formatted RONIN result for a particular query.
|
445
|
+
*/
|
433
446
|
formatIndividualResult<RecordType>(queryType: QueryType, queryInstructions: CombinedInstructions, model: Model, rows: Array<Array<RawRow>>, selectedFields: Array<InternalModelField>, single: boolean): RegularResult<RecordType>;
|
434
447
|
formatResults<RecordType>(results: Array<Array<ObjectRow>>, raw?: false): Array<Result<RecordType>>;
|
435
448
|
formatResults<RecordType>(results: Array<Array<RawRow>>, raw?: true): Array<Result<RecordType>>;
|
package/dist/index.js
CHANGED
@@ -2212,6 +2212,19 @@ var Transaction = class {
|
|
2212
2212
|
}
|
2213
2213
|
return single ? records[0] : records;
|
2214
2214
|
}
|
2215
|
+
/**
|
2216
|
+
* Formats an individual result of a query (each query has one individual result).
|
2217
|
+
*
|
2218
|
+
* @param queryType - The type of query that is being executed.
|
2219
|
+
* @param queryInstructions - The instructions if the query that is being executed.
|
2220
|
+
* @param model - The model for which the query is being executed.
|
2221
|
+
* @param rows - The rows that were returned from the database for the query (in the
|
2222
|
+
* form of an array containing arrays that contain strings).
|
2223
|
+
* @param selectedFields - The model fields that were selected by the query.
|
2224
|
+
* @param single - Whether a single or multiple records are being affected by the query.
|
2225
|
+
*
|
2226
|
+
* @returns A formatted RONIN result for a particular query.
|
2227
|
+
*/
|
2215
2228
|
formatIndividualResult(queryType, queryInstructions, model, rows, selectedFields, single) {
|
2216
2229
|
const modelFields = Object.fromEntries(
|
2217
2230
|
Object.entries(model.fields).map(([slug, rest]) => [slug, rest.type])
|
package/package.json
CHANGED