litedbmodel 1.0.1 → 1.1.0
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 +17 -13
- package/dist/DBModel.d.ts +18 -18
- package/dist/DBModel.d.ts.map +1 -1
- package/dist/DBModel.js +9 -9
- package/dist/DBModel.js.map +1 -1
- package/dist/LazyRelation.js +7 -7
- package/dist/LazyRelation.js.map +1 -1
- package/dist/SqlFragment.js +1 -1
- package/dist/SqlFragment.js.map +1 -1
- package/dist/decorators.d.ts +6 -7
- package/dist/decorators.d.ts.map +1 -1
- package/dist/decorators.js +36 -15
- package/dist/decorators.js.map +1 -1
- package/dist/types.d.ts +0 -9
- package/dist/types.d.ts.map +1 -1
- package/docs/COMPARISON.md +4 -2
- package/docs/api/README.md +61 -9
- package/docs/api/classes/Conditions.md +75 -8
- package/docs/api/classes/DBHandler.md +3 -3
- package/docs/api/classes/DBModel.md +260 -106
- package/docs/api/classes/LimitExceededError.md +1 -1
- package/docs/api/classes/Middleware.md +1 -1
- package/docs/api/classes/SqlRaw.md +53 -0
- package/docs/api/classes/SqlRef.md +59 -0
- package/docs/api/classes/Values.md +6 -6
- package/docs/api/classes/WriteInReadOnlyContextError.md +1 -1
- package/docs/api/classes/WriteOutsideTransactionError.md +1 -1
- package/docs/api/functions/belongsTo.md +2 -2
- package/docs/api/functions/closeAllPools.md +1 -1
- package/docs/api/functions/condsToRecord.md +23 -0
- package/docs/api/functions/createMiddleware.md +68 -0
- package/docs/api/functions/createPostgresDriver.md +2 -2
- package/docs/api/functions/createSqliteDriver.md +1 -1
- package/docs/api/functions/dbCast.md +1 -1
- package/docs/api/functions/dbCastIn.md +1 -1
- package/docs/api/functions/dbDynamic.md +1 -1
- package/docs/api/functions/dbFalse.md +1 -1
- package/docs/api/functions/dbImmediate.md +1 -1
- package/docs/api/functions/dbIn.md +1 -1
- package/docs/api/functions/dbNotNull.md +1 -1
- package/docs/api/functions/dbNow.md +1 -1
- package/docs/api/functions/dbNull.md +1 -1
- package/docs/api/functions/dbRaw.md +1 -1
- package/docs/api/functions/dbTrue.md +1 -1
- package/docs/api/functions/dbUuid.md +1 -1
- package/docs/api/functions/dbUuidIn.md +1 -1
- package/docs/api/functions/getDBConfig.md +1 -1
- package/docs/api/functions/getDBHandler.md +1 -1
- package/docs/api/functions/getTransactionConnection.md +2 -2
- package/docs/api/functions/getTransactionContext.md +2 -2
- package/docs/api/functions/hasMany.md +2 -2
- package/docs/api/functions/hasOne.md +2 -2
- package/docs/api/functions/initDBHandler.md +1 -1
- package/docs/api/functions/isAnySqlFragment.md +25 -0
- package/docs/api/functions/isSqlCondition.md +23 -0
- package/docs/api/functions/isSqlFragment.md +23 -0
- package/docs/api/functions/isSqlRaw.md +23 -0
- package/docs/api/functions/isSqlRef.md +23 -0
- package/docs/api/functions/isSqlTypedFragment.md +23 -0
- package/docs/api/functions/model.md +4 -4
- package/docs/api/functions/parentRef.md +1 -1
- package/docs/api/functions/sql.md +182 -0
- package/docs/api/globals.md +71 -19
- package/docs/api/interfaces/Column.md +31 -31
- package/docs/api/interfaces/ColumnOptions.md +4 -4
- package/docs/api/interfaces/CreatedMiddlewareClass.md +110 -0
- package/docs/api/interfaces/DBConfig.md +2 -2
- package/docs/api/interfaces/DBConfigOptions.md +1 -1
- package/docs/api/interfaces/DeleteOptions.md +1 -1
- package/docs/api/interfaces/InsertOptions.md +2 -2
- package/docs/api/interfaces/LimitConfig.md +1 -1
- package/docs/api/interfaces/MiddlewareConfig.md +40 -0
- package/docs/api/interfaces/ModelOptions.md +1 -1
- package/docs/api/interfaces/PkeyResult.md +1 -1
- package/docs/api/interfaces/SelectOptions.md +1 -1
- package/docs/api/interfaces/SqlCondition.md +27 -0
- package/docs/api/interfaces/SqlFragment.md +20 -0
- package/docs/api/interfaces/SqlTypedFragment.md +29 -0
- package/docs/api/interfaces/TransactionOptions.md +1 -1
- package/docs/api/interfaces/UpdateManyOptions.md +1 -1
- package/docs/api/interfaces/UpdateOptions.md +1 -1
- package/docs/sql-tagged-template.md +5 -5
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[litedbmodel](../globals.md) / SqlRaw
|
|
6
|
+
|
|
7
|
+
# Class: SqlRaw
|
|
8
|
+
|
|
9
|
+
Defined in: SqlFragment.ts:59
|
|
10
|
+
|
|
11
|
+
Raw SQL string that bypasses parameterization.
|
|
12
|
+
Created via `sql.raw()`. Only usable inside `sql` tagged templates.
|
|
13
|
+
|
|
14
|
+
## Constructors
|
|
15
|
+
|
|
16
|
+
### Constructor
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
new SqlRaw(value: string): SqlRaw;
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Defined in: SqlFragment.ts:61
|
|
23
|
+
|
|
24
|
+
#### Parameters
|
|
25
|
+
|
|
26
|
+
| Parameter | Type |
|
|
27
|
+
| ------ | ------ |
|
|
28
|
+
| `value` | `string` |
|
|
29
|
+
|
|
30
|
+
#### Returns
|
|
31
|
+
|
|
32
|
+
`SqlRaw`
|
|
33
|
+
|
|
34
|
+
## Properties
|
|
35
|
+
|
|
36
|
+
| Property | Modifier | Type | Defined in |
|
|
37
|
+
| ------ | ------ | ------ | ------ |
|
|
38
|
+
| <a id="_tag"></a> `_tag` | `readonly` | `"SqlRaw"` | SqlFragment.ts:60 |
|
|
39
|
+
| <a id="value"></a> `value` | `readonly` | `string` | SqlFragment.ts:61 |
|
|
40
|
+
|
|
41
|
+
## Methods
|
|
42
|
+
|
|
43
|
+
### toString()
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
toString(): string;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Defined in: SqlFragment.ts:62
|
|
50
|
+
|
|
51
|
+
#### Returns
|
|
52
|
+
|
|
53
|
+
`string`
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[litedbmodel](../globals.md) / SqlRef
|
|
6
|
+
|
|
7
|
+
# Class: SqlRef
|
|
8
|
+
|
|
9
|
+
Defined in: SqlFragment.ts:71
|
|
10
|
+
|
|
11
|
+
Table-qualified column reference (e.g., `users.id`).
|
|
12
|
+
Created via `sql.ref()`. Only usable inside `sql` tagged templates.
|
|
13
|
+
|
|
14
|
+
## Constructors
|
|
15
|
+
|
|
16
|
+
### Constructor
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
new SqlRef(column: {
|
|
20
|
+
tableName: string;
|
|
21
|
+
columnName: string;
|
|
22
|
+
}): SqlRef;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Defined in: SqlFragment.ts:76
|
|
26
|
+
|
|
27
|
+
#### Parameters
|
|
28
|
+
|
|
29
|
+
| Parameter | Type |
|
|
30
|
+
| ------ | ------ |
|
|
31
|
+
| `column` | \{ `tableName`: `string`; `columnName`: `string`; \} |
|
|
32
|
+
| `column.tableName` | `string` |
|
|
33
|
+
| `column.columnName` | `string` |
|
|
34
|
+
|
|
35
|
+
#### Returns
|
|
36
|
+
|
|
37
|
+
`SqlRef`
|
|
38
|
+
|
|
39
|
+
## Properties
|
|
40
|
+
|
|
41
|
+
| Property | Modifier | Type | Defined in |
|
|
42
|
+
| ------ | ------ | ------ | ------ |
|
|
43
|
+
| <a id="_tag"></a> `_tag` | `readonly` | `"SqlRef"` | SqlFragment.ts:72 |
|
|
44
|
+
| <a id="tablename"></a> `tableName` | `readonly` | `string` | SqlFragment.ts:73 |
|
|
45
|
+
| <a id="columnname"></a> `columnName` | `readonly` | `string` | SqlFragment.ts:74 |
|
|
46
|
+
|
|
47
|
+
## Methods
|
|
48
|
+
|
|
49
|
+
### toString()
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
toString(): string;
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Defined in: SqlFragment.ts:81
|
|
56
|
+
|
|
57
|
+
#### Returns
|
|
58
|
+
|
|
59
|
+
`string`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**litedbmodel
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: Values\<Model\>
|
|
8
8
|
|
|
9
|
-
Defined in: Column.ts:
|
|
9
|
+
Defined in: Column.ts:566
|
|
10
10
|
|
|
11
11
|
Type-safe builder for update/create value pairs.
|
|
12
12
|
Use array literals for static values, builder for dynamic construction.
|
|
@@ -48,7 +48,7 @@ await User.create(values.build());
|
|
|
48
48
|
new Values<Model>(initial?: readonly readonly [Column<any, Model>, unknown][]): Values<Model>;
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
Defined in: Column.ts:
|
|
51
|
+
Defined in: Column.ts:572
|
|
52
52
|
|
|
53
53
|
Create a Values builder, optionally with initial pairs.
|
|
54
54
|
|
|
@@ -72,7 +72,7 @@ Create a Values builder, optionally with initial pairs.
|
|
|
72
72
|
get length(): number;
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
Defined in: Column.ts:
|
|
75
|
+
Defined in: Column.ts:596
|
|
76
76
|
|
|
77
77
|
Get the number of pairs.
|
|
78
78
|
|
|
@@ -88,7 +88,7 @@ Get the number of pairs.
|
|
|
88
88
|
add<V>(column: Column<V, Model>, value: V | null | undefined): this;
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
Defined in: Column.ts:
|
|
91
|
+
Defined in: Column.ts:581
|
|
92
92
|
|
|
93
93
|
Add a type-safe column-value pair.
|
|
94
94
|
|
|
@@ -117,7 +117,7 @@ Add a type-safe column-value pair.
|
|
|
117
117
|
build(): readonly readonly [Column<any, any>, unknown][];
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
Defined in: Column.ts:
|
|
120
|
+
Defined in: Column.ts:589
|
|
121
121
|
|
|
122
122
|
Build the final array for use with update/create.
|
|
123
123
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**litedbmodel
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
function belongsTo(keys: KeysFactory, options?: RelationDecoratorOptions): PropertyDecorator;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Defined in: decorators.ts:
|
|
13
|
+
Defined in: decorators.ts:830
|
|
14
14
|
|
|
15
15
|
BelongsTo relation decorator (N:1).
|
|
16
16
|
Defines a many-to-one relationship where this model belongs to a parent record.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[litedbmodel](../globals.md) / condsToRecord
|
|
6
|
+
|
|
7
|
+
# Function: condsToRecord()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function condsToRecord(conditions: Conds): Record<string, unknown>;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: Column.ts:1006
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type |
|
|
18
|
+
| ------ | ------ |
|
|
19
|
+
| `conditions` | `Conds` |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`Record`\<`string`, `unknown`\>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[litedbmodel](../globals.md) / createMiddleware
|
|
6
|
+
|
|
7
|
+
# Function: createMiddleware()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function createMiddleware<S>(config: MiddlewareConfig<S>): CreatedMiddlewareClass<S>;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: Middleware.ts:482
|
|
14
|
+
|
|
15
|
+
Create a middleware class from a configuration object.
|
|
16
|
+
|
|
17
|
+
This is a simpler alternative to extending the Middleware class directly.
|
|
18
|
+
Each request gets its own copy of the state object via AsyncLocalStorage.
|
|
19
|
+
|
|
20
|
+
## Type Parameters
|
|
21
|
+
|
|
22
|
+
| Type Parameter | Default type |
|
|
23
|
+
| ------ | ------ |
|
|
24
|
+
| `S` *extends* `object` | `Record`\<`string`, `never`\> |
|
|
25
|
+
|
|
26
|
+
## Parameters
|
|
27
|
+
|
|
28
|
+
| Parameter | Type | Description |
|
|
29
|
+
| ------ | ------ | ------ |
|
|
30
|
+
| `config` | [`MiddlewareConfig`](../interfaces/MiddlewareConfig.md)\<`S`\> | Middleware configuration with state and hook functions |
|
|
31
|
+
|
|
32
|
+
## Returns
|
|
33
|
+
|
|
34
|
+
[`CreatedMiddlewareClass`](../interfaces/CreatedMiddlewareClass.md)\<`S`\>
|
|
35
|
+
|
|
36
|
+
A middleware class that can be passed to DBModel.use()
|
|
37
|
+
|
|
38
|
+
## Example
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
// Simple logger (no state)
|
|
42
|
+
const LoggerMiddleware = createMiddleware({
|
|
43
|
+
execute: async function(next, sql, params) {
|
|
44
|
+
console.log('SQL:', sql);
|
|
45
|
+
return next(sql, params);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// With per-request state
|
|
50
|
+
const TenantMiddleware = createMiddleware({
|
|
51
|
+
state: { tenantId: 0 },
|
|
52
|
+
|
|
53
|
+
// Hook signature: (model, next, ...args) for method-level hooks
|
|
54
|
+
find: async function(model, next, conditions, options) {
|
|
55
|
+
// `this` is typed as { tenantId: number }
|
|
56
|
+
if (model.tenant_id) {
|
|
57
|
+
conditions = [[model.tenant_id, this.tenantId], ...conditions];
|
|
58
|
+
}
|
|
59
|
+
return next(conditions, options);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// Register and use
|
|
64
|
+
DBModel.use(TenantMiddleware);
|
|
65
|
+
|
|
66
|
+
// Set tenant for current request
|
|
67
|
+
TenantMiddleware.getCurrentContext().tenantId = 123;
|
|
68
|
+
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**litedbmodel
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
function createPostgresDriver(options: DBDriverOptions): PostgresDriver;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Defined in: drivers/postgres.ts:
|
|
13
|
+
Defined in: drivers/postgres.ts:291
|
|
14
14
|
|
|
15
15
|
Create a PostgreSQL driver instance
|
|
16
16
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**litedbmodel
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
function getTransactionConnection(): DBConnection | undefined;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Defined in: DBModel.ts:
|
|
13
|
+
Defined in: DBModel.ts:48
|
|
14
14
|
|
|
15
15
|
Get current transaction connection (if in a transaction)
|
|
16
16
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**litedbmodel
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
function getTransactionContext(): TransactionContext | undefined;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Defined in: DBModel.ts:
|
|
13
|
+
Defined in: DBModel.ts:41
|
|
14
14
|
|
|
15
15
|
Get current transaction context (if in a transaction)
|
|
16
16
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**litedbmodel
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
function hasMany(keys: KeysFactory, options?: RelationDecoratorOptions): PropertyDecorator;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Defined in: decorators.ts:
|
|
13
|
+
Defined in: decorators.ts:798
|
|
14
14
|
|
|
15
15
|
HasMany relation decorator (1:N).
|
|
16
16
|
Defines a one-to-many relationship where this model has many related records.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**litedbmodel
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
function hasOne(keys: KeysFactory, options?: RelationDecoratorOptions): PropertyDecorator;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Defined in: decorators.ts:
|
|
13
|
+
Defined in: decorators.ts:862
|
|
14
14
|
|
|
15
15
|
HasOne relation decorator (1:1).
|
|
16
16
|
Defines a one-to-one relationship where this model has one related record.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[litedbmodel](../globals.md) / isAnySqlFragment
|
|
6
|
+
|
|
7
|
+
# Function: isAnySqlFragment()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function isAnySqlFragment(value: unknown): value is SqlFragment | SqlTypedFragment<unknown, unknown> | SqlCondition<unknown>;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: SqlFragment.ts:148
|
|
14
|
+
|
|
15
|
+
Matches any of SqlFragment, SqlTypedFragment, or SqlCondition.
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
| Parameter | Type |
|
|
20
|
+
| ------ | ------ |
|
|
21
|
+
| `value` | `unknown` |
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
value is SqlFragment \| SqlTypedFragment\<unknown, unknown\> \| SqlCondition\<unknown\>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[litedbmodel](../globals.md) / isSqlCondition
|
|
6
|
+
|
|
7
|
+
# Function: isSqlCondition()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function isSqlCondition(value: unknown): value is SqlCondition<unknown>;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: SqlFragment.ts:136
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type |
|
|
18
|
+
| ------ | ------ |
|
|
19
|
+
| `value` | `unknown` |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`value is SqlCondition<unknown>`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[litedbmodel](../globals.md) / isSqlFragment
|
|
6
|
+
|
|
7
|
+
# Function: isSqlFragment()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function isSqlFragment(value: unknown): value is SqlFragment;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: SqlFragment.ts:118
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type |
|
|
18
|
+
| ------ | ------ |
|
|
19
|
+
| `value` | `unknown` |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`value is SqlFragment`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[litedbmodel](../globals.md) / isSqlRaw
|
|
6
|
+
|
|
7
|
+
# Function: isSqlRaw()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function isSqlRaw(value: unknown): value is SqlRaw;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: SqlFragment.ts:154
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type |
|
|
18
|
+
| ------ | ------ |
|
|
19
|
+
| `value` | `unknown` |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`value is SqlRaw`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[litedbmodel](../globals.md) / isSqlRef
|
|
6
|
+
|
|
7
|
+
# Function: isSqlRef()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function isSqlRef(value: unknown): value is SqlRef;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: SqlFragment.ts:158
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type |
|
|
18
|
+
| ------ | ------ |
|
|
19
|
+
| `value` | `unknown` |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`value is SqlRef`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**litedbmodel v1.0.1**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[litedbmodel](../globals.md) / isSqlTypedFragment
|
|
6
|
+
|
|
7
|
+
# Function: isSqlTypedFragment()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function isSqlTypedFragment(value: unknown): value is SqlTypedFragment<unknown, unknown>;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: SqlFragment.ts:127
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type |
|
|
18
|
+
| ------ | ------ |
|
|
19
|
+
| `value` | `unknown` |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`value is SqlTypedFragment<unknown, unknown>`
|