@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.
- package/dist/src/browser/index.d.ts +13 -13
- package/dist/src/browser/index.js +26 -13
- package/dist/src/browser/index.js.map +1 -1
- package/dist/src/core/index.cjs +677 -525
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.js +677 -525
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +178 -136
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +40 -19
- package/dist/src/server/index.d.ts +40 -19
- package/dist/src/server/index.js +178 -137
- package/dist/src/server/index.js.map +1 -1
- package/package.json +20 -17
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { AggregateFunction } from '../core/index.
|
|
2
|
-
import { AggregateFunction as AggregateFunction_2 } from '
|
|
3
|
-
import { ColumnType } from '../core/index.
|
|
4
|
-
import { Condition } from '../core/index.
|
|
5
|
-
import { Criteria } from '../core/index.
|
|
6
|
-
import { Criteria as Criteria_2 } from '
|
|
7
|
-
import { DriverInterface } from '../core/index.
|
|
8
|
-
import { DriverInterface as DriverInterface_2 } from '
|
|
9
|
-
import { DriverMeta } from '
|
|
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 '
|
|
12
|
-
import { Migration } from '
|
|
13
|
-
import { MigrationStep } from '../core/index.
|
|
14
|
-
import { Order } from '../core/index.
|
|
15
|
-
import { Row } from '../core/index.
|
|
16
|
-
import { Row as Row_2 } from '
|
|
17
|
-
import { TableSchema } from '../core/index.
|
|
18
|
-
import { TableSchema as TableSchema_2 } from '
|
|
19
|
-
import { TransactionInterface } from '
|
|
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('
|
|
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.
|
|
2
|
-
import { AggregateFunction as AggregateFunction_2 } from '
|
|
3
|
-
import { ColumnType } from '../core/index.
|
|
4
|
-
import { Condition } from '../core/index.
|
|
5
|
-
import { Criteria } from '../core/index.
|
|
6
|
-
import { Criteria as Criteria_2 } from '
|
|
7
|
-
import { DriverInterface } from '../core/index.
|
|
8
|
-
import { DriverInterface as DriverInterface_2 } from '
|
|
9
|
-
import { DriverMeta } from '
|
|
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 '
|
|
12
|
-
import { Migration } from '
|
|
13
|
-
import { MigrationStep } from '../core/index.
|
|
14
|
-
import { Order } from '../core/index.
|
|
15
|
-
import { Row } from '../core/index.
|
|
16
|
-
import { Row as Row_2 } from '
|
|
17
|
-
import { TableSchema } from '../core/index.
|
|
18
|
-
import { TableSchema as TableSchema_2 } from '
|
|
19
|
-
import { TransactionInterface } from '
|
|
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('
|
|
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
|