@faasjs/knex 0.0.2-beta.401 → 0.0.2-beta.404
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 +3 -11
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/package.json +6 -5
package/dist/index.d.ts
CHANGED
|
@@ -5,9 +5,6 @@ declare type KnexConfig = {
|
|
|
5
5
|
name?: string;
|
|
6
6
|
config?: Knex$1.Config;
|
|
7
7
|
};
|
|
8
|
-
/**
|
|
9
|
-
* Knex 插件
|
|
10
|
-
*/
|
|
11
8
|
declare class Knex implements Plugin {
|
|
12
9
|
readonly type: string;
|
|
13
10
|
readonly name: string;
|
|
@@ -15,12 +12,6 @@ declare class Knex implements Plugin {
|
|
|
15
12
|
adapter: Knex$1;
|
|
16
13
|
query: Knex$1;
|
|
17
14
|
private logger;
|
|
18
|
-
/**
|
|
19
|
-
* 创建插件实例
|
|
20
|
-
* @param config {object} 配置
|
|
21
|
-
* @param config.name {string} 配置名
|
|
22
|
-
* @param config.config {object} 数据库配置
|
|
23
|
-
*/
|
|
24
15
|
constructor(config?: KnexConfig);
|
|
25
16
|
onDeploy(data: DeployData, next: Next): Promise<void>;
|
|
26
17
|
onMount(data: MountData, next: Next): Promise<void>;
|
|
@@ -31,8 +22,8 @@ declare class Knex implements Plugin {
|
|
|
31
22
|
quit(): Promise<void>;
|
|
32
23
|
}
|
|
33
24
|
declare function useKnex(config?: KnexConfig): Knex & UseifyPlugin;
|
|
34
|
-
declare function query<TName extends Knex$1.TableNames>(table: TName
|
|
35
|
-
_base:
|
|
25
|
+
declare function query<TName extends Knex$1.TableNames>(table: TName): Knex$1.QueryBuilder<Knex$1.TableType<TName>, {
|
|
26
|
+
_base: Knex$1.ResolveTableType<Knex$1.TableType<TName>, 'base'>;
|
|
36
27
|
_hasSelection: false;
|
|
37
28
|
_keys: never;
|
|
38
29
|
_aliases: {};
|
|
@@ -40,6 +31,7 @@ declare function query<TName extends Knex$1.TableNames>(table: TName | string):
|
|
|
40
31
|
_intersectProps: {};
|
|
41
32
|
_unionProps: never;
|
|
42
33
|
}[]>;
|
|
34
|
+
declare function query<TName extends {} = any, TResult = any[]>(table: string): Knex$1.QueryBuilder<TName, TResult>;
|
|
43
35
|
declare function transaction<TResult = any>(scope: (trx: Knex$1.Transaction<any, any>) => Promise<TResult> | void, config?: any): Promise<TResult>;
|
|
44
36
|
declare function raw<TResult = any>(sql: string, bindings?: Knex$1.RawBinding[] | Knex$1.ValueDict): Promise<Knex$1.Raw<TResult>>;
|
|
45
37
|
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
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.404",
|
|
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.404",
|
|
26
|
+
"@faasjs/func": "^0.0.2-beta.404",
|
|
27
|
+
"@faasjs/logger": "^0.0.2-beta.404",
|
|
28
28
|
"knex": "*"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"pg": "*",
|
|
36
36
|
"better-sqlite3": "*",
|
|
37
37
|
"tsup": "*",
|
|
38
|
-
"typescript": "*"
|
|
38
|
+
"typescript": "*",
|
|
39
|
+
"tsd": "*"
|
|
39
40
|
},
|
|
40
41
|
"engines": {
|
|
41
42
|
"npm": ">=8.0.0",
|