@faasjs/knex 0.0.2-beta.358 → 0.0.2-beta.362
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 +114 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -5,3 +5,117 @@ Knex 插件
|
|
|
5
5
|
[](https://github.com/faasjs/faasjs/blob/main/packages/faasjs/knex/LICENSE)
|
|
6
6
|
[](https://www.npmjs.com/package/@faasjs/knex)
|
|
7
7
|
[](https://www.npmjs.com/package/@faasjs/knex)
|
|
8
|
+
|
|
9
|
+
## Modules
|
|
10
|
+
|
|
11
|
+
### Classes
|
|
12
|
+
|
|
13
|
+
- [Knex](classes/Knex.md)
|
|
14
|
+
|
|
15
|
+
### Type aliases
|
|
16
|
+
|
|
17
|
+
- [KnexConfig](modules.md#knexconfig)
|
|
18
|
+
|
|
19
|
+
### Functions
|
|
20
|
+
|
|
21
|
+
- [query](modules.md#query)
|
|
22
|
+
- [raw](modules.md#raw)
|
|
23
|
+
- [transaction](modules.md#transaction)
|
|
24
|
+
- [useKnex](modules.md#useknex)
|
|
25
|
+
|
|
26
|
+
## Type aliases
|
|
27
|
+
|
|
28
|
+
### KnexConfig
|
|
29
|
+
|
|
30
|
+
Ƭ **KnexConfig**: `Object`
|
|
31
|
+
|
|
32
|
+
#### Type declaration
|
|
33
|
+
|
|
34
|
+
| Name | Type |
|
|
35
|
+
| :------ | :------ |
|
|
36
|
+
| `config?` | `K.Config` |
|
|
37
|
+
| `name?` | `string` |
|
|
38
|
+
|
|
39
|
+
## Functions
|
|
40
|
+
|
|
41
|
+
### query
|
|
42
|
+
|
|
43
|
+
▸ **query**<`TName`\>(`table`): `QueryBuilder`<`TableType`<`TName`\>, `DeferredKeySelection`<`ResolveTableType`<`TableType`<`TName`\>, ``"base"``\>, `never`, ``false``, {}, ``false``, {}, `never`\>[]\>
|
|
44
|
+
|
|
45
|
+
#### Type parameters
|
|
46
|
+
|
|
47
|
+
| Name | Type |
|
|
48
|
+
| :------ | :------ |
|
|
49
|
+
| `TName` | extends `never` |
|
|
50
|
+
|
|
51
|
+
#### Parameters
|
|
52
|
+
|
|
53
|
+
| Name | Type |
|
|
54
|
+
| :------ | :------ |
|
|
55
|
+
| `table` | `TName` |
|
|
56
|
+
|
|
57
|
+
#### Returns
|
|
58
|
+
|
|
59
|
+
`QueryBuilder`<`TableType`<`TName`\>, `DeferredKeySelection`<`ResolveTableType`<`TableType`<`TName`\>, ``"base"``\>, `never`, ``false``, {}, ``false``, {}, `never`\>[]\>
|
|
60
|
+
|
|
61
|
+
___
|
|
62
|
+
|
|
63
|
+
### raw
|
|
64
|
+
|
|
65
|
+
▸ **raw**<`TResult`\>(`sql`, `bindings?`): `Promise`<`K.Raw`<`TResult`\>\>
|
|
66
|
+
|
|
67
|
+
#### Type parameters
|
|
68
|
+
|
|
69
|
+
| Name | Type |
|
|
70
|
+
| :------ | :------ |
|
|
71
|
+
| `TResult` | `any` |
|
|
72
|
+
|
|
73
|
+
#### Parameters
|
|
74
|
+
|
|
75
|
+
| Name | Type | Default value |
|
|
76
|
+
| :------ | :------ | :------ |
|
|
77
|
+
| `sql` | `string` | `undefined` |
|
|
78
|
+
| `bindings` | `RawBinding`[] \| `ValueDict` | `[]` |
|
|
79
|
+
|
|
80
|
+
#### Returns
|
|
81
|
+
|
|
82
|
+
`Promise`<`K.Raw`<`TResult`\>\>
|
|
83
|
+
|
|
84
|
+
___
|
|
85
|
+
|
|
86
|
+
### transaction
|
|
87
|
+
|
|
88
|
+
▸ **transaction**<`TResult`\>(`scope`, `config?`): `Promise`<`TResult`\>
|
|
89
|
+
|
|
90
|
+
#### Type parameters
|
|
91
|
+
|
|
92
|
+
| Name | Type |
|
|
93
|
+
| :------ | :------ |
|
|
94
|
+
| `TResult` | `any` |
|
|
95
|
+
|
|
96
|
+
#### Parameters
|
|
97
|
+
|
|
98
|
+
| Name | Type |
|
|
99
|
+
| :------ | :------ |
|
|
100
|
+
| `scope` | (`trx`: `Transaction`<`any`, `any`\>) => `void` \| `Promise`<`TResult`\> |
|
|
101
|
+
| `config?` | `any` |
|
|
102
|
+
|
|
103
|
+
#### Returns
|
|
104
|
+
|
|
105
|
+
`Promise`<`TResult`\>
|
|
106
|
+
|
|
107
|
+
___
|
|
108
|
+
|
|
109
|
+
### useKnex
|
|
110
|
+
|
|
111
|
+
▸ **useKnex**(`config?`): [`Knex`](classes/Knex.md) & `UseifyPlugin`
|
|
112
|
+
|
|
113
|
+
#### Parameters
|
|
114
|
+
|
|
115
|
+
| Name | Type |
|
|
116
|
+
| :------ | :------ |
|
|
117
|
+
| `config?` | [`KnexConfig`](modules.md#knexconfig) |
|
|
118
|
+
|
|
119
|
+
#### Returns
|
|
120
|
+
|
|
121
|
+
[`Knex`](classes/Knex.md) & `UseifyPlugin`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/knex",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.362",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@faasjs/deep_merge": "^0.0.2-beta.
|
|
26
|
-
"@faasjs/func": "^0.0.2-beta.
|
|
27
|
-
"@faasjs/logger": "^0.0.2-beta.
|
|
25
|
+
"@faasjs/deep_merge": "^0.0.2-beta.362",
|
|
26
|
+
"@faasjs/func": "^0.0.2-beta.362",
|
|
27
|
+
"@faasjs/logger": "^0.0.2-beta.362",
|
|
28
28
|
"knex": "*"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|