@orkestrel/database 0.0.5 → 0.0.6

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.
@@ -1,22 +1,22 @@
1
- import { AggregateFunction } from '../core/index.js';
2
- import { AggregateFunction as AggregateFunction_2 } from '../core/index.js';
3
- import { ColumnType } from '../core/index.js';
4
- import { Condition } from '../core/index.js';
5
- import { Criteria } from '../core/index.js';
6
- import { Criteria as Criteria_2 } from '../core/index.js';
7
- import { DriverInterface } from '../core/index.js';
8
- import { DriverInterface as DriverInterface_2 } from '../core/index.js';
9
- import { DriverMeta } from '../core/index.js';
1
+ import { AggregateFunction } from '../core/index.ts';
2
+ import { AggregateFunction as AggregateFunction_2 } from '../../core/index.ts';
3
+ import { ColumnType } from '../core/index.ts';
4
+ import { Condition } from '../core/index.ts';
5
+ import { Criteria } from '../core/index.ts';
6
+ import { Criteria as Criteria_2 } from '../../core/index.ts';
7
+ import { DriverInterface } from '../core/index.ts';
8
+ import { DriverInterface as DriverInterface_2 } from '../../core/index.ts';
9
+ import { DriverMeta } from '../../core/index.ts';
10
10
  import { FieldPath } from '@orkestrel/contract';
11
- import { Key } from '../core/index.js';
12
- import { Migration } from '../core/index.js';
13
- import { MigrationStep } from '../core/index.js';
14
- import { Order } from '../core/index.js';
15
- import { Row } from '../core/index.js';
16
- import { Row as Row_2 } from '../core/index.js';
17
- import { TableSchema } from '../core/index.js';
18
- import { TableSchema as TableSchema_2 } from '../core/index.js';
19
- import { TransactionInterface } from '../core/index.js';
11
+ import { Key } from '../../core/index.ts';
12
+ import { Migration } from '../../core/index.ts';
13
+ import { MigrationStep } from '../core/index.ts';
14
+ import { Order } from '../core/index.ts';
15
+ import { Row } from '../core/index.ts';
16
+ import { Row as Row_2 } from '../../core/index.ts';
17
+ import { TableSchema } from '../core/index.ts';
18
+ import { TableSchema as TableSchema_2 } from '../../core/index.ts';
19
+ import { TransactionInterface } from '../../core/index.ts';
20
20
 
21
21
  /**
22
22
  * Compile an {@link AggregateFunction} over a {@link FieldPath} to its SQL
@@ -398,6 +398,27 @@ export declare const EXACT_COLUMN_TYPES: readonly ColumnType[];
398
398
  */
399
399
  export declare const EXACT_RANGE_COLUMN_TYPES: readonly ColumnType[];
400
400
 
401
+ /**
402
+ * Extract a stored row's values in a declared positional order.
403
+ *
404
+ * @remarks
405
+ * SQLite statements bind arrays positionally. Every requested column must be
406
+ * present in `row`; an incomplete backend row is a typed `DRIVER` fault carrying
407
+ * the table and missing column in its context.
408
+ *
409
+ * @param row - The stored SQLite row
410
+ * @param names - The column names in binding order
411
+ * @param table - The owning table name for fault context
412
+ * @returns The row values in the same order as `names`
413
+ * @throws A `DRIVER` {@link DatabaseError} when a requested column is missing
414
+ *
415
+ * @example
416
+ * ```ts
417
+ * extractValues({ id: 'u1', age: 36 }, ['age', 'id'], 'users') // [36, 'u1']
418
+ * ```
419
+ */
420
+ export declare function extractValues(row: SQLiteRow, names: readonly string[], table: string): readonly SQLiteValue[];
421
+
401
422
  /**
402
423
  * Compile a {@link FieldPath} to the SQL expression that reads it.
403
424
  *
@@ -586,7 +607,7 @@ export declare function isExactCriteria(criteria: Criteria, schema: TableSchema)
586
607
 
587
608
  /**
588
609
  * Whether one {@link Order} term's column compiles to an `ORDER BY` that
589
- * matches the engine's {@link import('../core/index.js').sortRows} exactly.
610
+ * matches the engine's {@link import('@src/core').sortRows} exactly.
590
611
  *
591
612
  * @remarks
592
613
  * `false` for a nested `FieldPath`, a column absent from `schema`, or a
@@ -1,22 +1,22 @@
1
- import { AggregateFunction } from '../core/index.js';
2
- import { AggregateFunction as AggregateFunction_2 } from '../core/index.js';
3
- import { ColumnType } from '../core/index.js';
4
- import { Condition } from '../core/index.js';
5
- import { Criteria } from '../core/index.js';
6
- import { Criteria as Criteria_2 } from '../core/index.js';
7
- import { DriverInterface } from '../core/index.js';
8
- import { DriverInterface as DriverInterface_2 } from '../core/index.js';
9
- import { DriverMeta } from '../core/index.js';
1
+ import { AggregateFunction } from '../core/index.ts';
2
+ import { AggregateFunction as AggregateFunction_2 } from '../../core/index.ts';
3
+ import { ColumnType } from '../core/index.ts';
4
+ import { Condition } from '../core/index.ts';
5
+ import { Criteria } from '../core/index.ts';
6
+ import { Criteria as Criteria_2 } from '../../core/index.ts';
7
+ import { DriverInterface } from '../core/index.ts';
8
+ import { DriverInterface as DriverInterface_2 } from '../../core/index.ts';
9
+ import { DriverMeta } from '../../core/index.ts';
10
10
  import { FieldPath } from '@orkestrel/contract';
11
- import { Key } from '../core/index.js';
12
- import { Migration } from '../core/index.js';
13
- import { MigrationStep } from '../core/index.js';
14
- import { Order } from '../core/index.js';
15
- import { Row } from '../core/index.js';
16
- import { Row as Row_2 } from '../core/index.js';
17
- import { TableSchema } from '../core/index.js';
18
- import { TableSchema as TableSchema_2 } from '../core/index.js';
19
- import { TransactionInterface } from '../core/index.js';
11
+ import { Key } from '../../core/index.ts';
12
+ import { Migration } from '../../core/index.ts';
13
+ import { MigrationStep } from '../core/index.ts';
14
+ import { Order } from '../core/index.ts';
15
+ import { Row } from '../core/index.ts';
16
+ import { Row as Row_2 } from '../../core/index.ts';
17
+ import { TableSchema } from '../core/index.ts';
18
+ import { TableSchema as TableSchema_2 } from '../../core/index.ts';
19
+ import { TransactionInterface } from '../../core/index.ts';
20
20
 
21
21
  /**
22
22
  * Compile an {@link AggregateFunction} over a {@link FieldPath} to its SQL
@@ -398,6 +398,27 @@ export declare const EXACT_COLUMN_TYPES: readonly ColumnType[];
398
398
  */
399
399
  export declare const EXACT_RANGE_COLUMN_TYPES: readonly ColumnType[];
400
400
 
401
+ /**
402
+ * Extract a stored row's values in a declared positional order.
403
+ *
404
+ * @remarks
405
+ * SQLite statements bind arrays positionally. Every requested column must be
406
+ * present in `row`; an incomplete backend row is a typed `DRIVER` fault carrying
407
+ * the table and missing column in its context.
408
+ *
409
+ * @param row - The stored SQLite row
410
+ * @param names - The column names in binding order
411
+ * @param table - The owning table name for fault context
412
+ * @returns The row values in the same order as `names`
413
+ * @throws A `DRIVER` {@link DatabaseError} when a requested column is missing
414
+ *
415
+ * @example
416
+ * ```ts
417
+ * extractValues({ id: 'u1', age: 36 }, ['age', 'id'], 'users') // [36, 'u1']
418
+ * ```
419
+ */
420
+ export declare function extractValues(row: SQLiteRow, names: readonly string[], table: string): readonly SQLiteValue[];
421
+
401
422
  /**
402
423
  * Compile a {@link FieldPath} to the SQL expression that reads it.
403
424
  *
@@ -586,7 +607,7 @@ export declare function isExactCriteria(criteria: Criteria, schema: TableSchema)
586
607
 
587
608
  /**
588
609
  * Whether one {@link Order} term's column compiles to an `ORDER BY` that
589
- * matches the engine's {@link import('../core/index.js').sortRows} exactly.
610
+ * matches the engine's {@link import('@src/core').sortRows} exactly.
590
611
  *
591
612
  * @remarks
592
613
  * `false` for a nested `FieldPath`, a column absent from `schema`, or a