@objectstack/driver-sql 3.2.9 → 3.3.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/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +96 -42
- package/dist/index.d.ts +96 -42
- package/dist/index.js +147 -50
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +148 -51
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/sql-driver-advanced.test.ts +9 -9
- package/src/sql-driver-queryast.test.ts +84 -21
- package/src/sql-driver-schema.test.ts +67 -0
- package/src/sql-driver.test.ts +1 -1
- package/src/sql-driver.ts +224 -92
- package/tsconfig.json +4 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @objectstack/driver-sql@3.
|
|
2
|
+
> @objectstack/driver-sql@3.3.0 build /home/runner/work/spec/spec/packages/plugins/driver-sql
|
|
3
3
|
> tsup --config ../../../tsup.config.ts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m36.03 KB[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m66.38 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 92ms
|
|
16
|
+
[32mCJS[39m [1mdist/index.js [22m[32m37.71 KB[39m
|
|
17
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m66.46 KB[39m
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 91ms
|
|
19
19
|
[34mDTS[39m Build start
|
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
|
21
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[
|
|
22
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
20
|
+
[32mDTS[39m ⚡️ Build success in 12673ms
|
|
21
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m7.76 KB[39m
|
|
22
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m7.76 KB[39m
|
package/CHANGELOG.md
ADDED
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Knex } from 'knex';
|
|
1
|
+
import { QueryAST, DriverOptions } from '@objectstack/spec/data';
|
|
2
|
+
import { IDataDriver } from '@objectstack/spec/contracts';
|
|
3
|
+
import knex, { Knex } from 'knex';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* SQL Driver for ObjectStack
|
|
7
7
|
*
|
|
8
|
-
* Implements the standard
|
|
8
|
+
* Implements the standard IDataDriver from @objectstack/spec via Knex.js.
|
|
9
9
|
* Supports PostgreSQL, MySQL, SQLite, and other SQL databases.
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -41,84 +41,138 @@ type SqlDriverConfig = Knex.Config;
|
|
|
41
41
|
/**
|
|
42
42
|
* SQL Driver for ObjectStack.
|
|
43
43
|
*
|
|
44
|
-
* Implements the
|
|
44
|
+
* Implements the IDataDriver contract via Knex.js for optimal SQL
|
|
45
45
|
* generation against PostgreSQL, MySQL, SQLite and other SQL databases.
|
|
46
46
|
*/
|
|
47
|
-
declare class SqlDriver implements
|
|
48
|
-
readonly name
|
|
49
|
-
readonly version
|
|
47
|
+
declare class SqlDriver implements IDataDriver {
|
|
48
|
+
readonly name: string;
|
|
49
|
+
readonly version: string;
|
|
50
50
|
readonly supports: {
|
|
51
|
+
create: boolean;
|
|
52
|
+
read: boolean;
|
|
53
|
+
update: boolean;
|
|
54
|
+
delete: boolean;
|
|
55
|
+
bulkCreate: boolean;
|
|
56
|
+
bulkUpdate: boolean;
|
|
57
|
+
bulkDelete: boolean;
|
|
51
58
|
transactions: boolean;
|
|
52
|
-
|
|
53
|
-
fullTextSearch: boolean;
|
|
54
|
-
jsonFields: boolean;
|
|
55
|
-
arrayFields: boolean;
|
|
59
|
+
savepoints: boolean;
|
|
56
60
|
queryFilters: boolean;
|
|
57
61
|
queryAggregations: boolean;
|
|
58
62
|
querySorting: boolean;
|
|
59
63
|
queryPagination: boolean;
|
|
60
64
|
queryWindowFunctions: boolean;
|
|
61
65
|
querySubqueries: boolean;
|
|
66
|
+
queryCTE: boolean;
|
|
67
|
+
joins: boolean;
|
|
68
|
+
fullTextSearch: boolean;
|
|
69
|
+
jsonQuery: boolean;
|
|
70
|
+
geospatialQuery: boolean;
|
|
71
|
+
streaming: boolean;
|
|
72
|
+
jsonFields: boolean;
|
|
73
|
+
arrayFields: boolean;
|
|
74
|
+
vectorSearch: boolean;
|
|
75
|
+
schemaSync: boolean;
|
|
76
|
+
migrations: boolean;
|
|
77
|
+
indexes: boolean;
|
|
78
|
+
connectionPooling: boolean;
|
|
79
|
+
preparedStatements: boolean;
|
|
80
|
+
queryCache: boolean;
|
|
62
81
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
82
|
+
protected knex: Knex;
|
|
83
|
+
protected config: Knex.Config;
|
|
84
|
+
protected jsonFields: Record<string, string[]>;
|
|
85
|
+
protected booleanFields: Record<string, string[]>;
|
|
86
|
+
protected tablesWithTimestamps: Set<string>;
|
|
68
87
|
/** Whether the underlying database is a SQLite variant (sqlite3 or better-sqlite3). */
|
|
69
|
-
|
|
88
|
+
protected get isSqlite(): boolean;
|
|
70
89
|
/** Whether the underlying database is PostgreSQL. */
|
|
71
|
-
|
|
90
|
+
protected get isPostgres(): boolean;
|
|
72
91
|
/** Whether the underlying database is MySQL. */
|
|
73
|
-
|
|
92
|
+
protected get isMysql(): boolean;
|
|
74
93
|
constructor(config: SqlDriverConfig);
|
|
75
94
|
connect(): Promise<void>;
|
|
76
95
|
checkHealth(): Promise<boolean>;
|
|
77
96
|
disconnect(): Promise<void>;
|
|
78
|
-
find(object: string, query:
|
|
79
|
-
findOne(object: string, query:
|
|
97
|
+
find(object: string, query: QueryAST, options?: DriverOptions): Promise<any[]>;
|
|
98
|
+
findOne(object: string, query: QueryAST, options?: DriverOptions): Promise<any>;
|
|
99
|
+
/**
|
|
100
|
+
* Stream records matching a structured query.
|
|
101
|
+
* NOTE: Current implementation fetches all results then yields them.
|
|
102
|
+
* TODO: Use Knex .stream() for true cursor-based streaming on large datasets.
|
|
103
|
+
*/
|
|
104
|
+
findStream(object: string, query: QueryAST, options?: DriverOptions): AsyncGenerator<Record<string, any>>;
|
|
80
105
|
create(object: string, data: Record<string, any>, options?: DriverOptions): Promise<any>;
|
|
81
106
|
update(object: string, id: string | number, data: Record<string, any>, options?: DriverOptions): Promise<any>;
|
|
82
|
-
|
|
107
|
+
upsert(object: string, data: Record<string, any>, conflictKeys?: string[], options?: DriverOptions): Promise<Record<string, any>>;
|
|
108
|
+
delete(object: string, id: string | number, options?: DriverOptions): Promise<boolean>;
|
|
83
109
|
bulkCreate(object: string, data: any[], options?: DriverOptions): Promise<any>;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
110
|
+
/**
|
|
111
|
+
* Batch-update multiple records by ID.
|
|
112
|
+
* NOTE: Current implementation performs sequential updates for correctness.
|
|
113
|
+
* TODO: Optimize with SQL CASE statements or batched transactions for performance.
|
|
114
|
+
*/
|
|
115
|
+
bulkUpdate(object: string, updates: Array<{
|
|
116
|
+
id: string | number;
|
|
117
|
+
data: Record<string, any>;
|
|
118
|
+
}>, options?: DriverOptions): Promise<Record<string, any>[]>;
|
|
119
|
+
bulkDelete(object: string, ids: Array<string | number>, options?: DriverOptions): Promise<void>;
|
|
120
|
+
updateMany(object: string, query: QueryAST, data: any, options?: DriverOptions): Promise<number>;
|
|
121
|
+
deleteMany(object: string, query: QueryAST, options?: DriverOptions): Promise<number>;
|
|
122
|
+
count(object: string, query?: QueryAST, options?: DriverOptions): Promise<number>;
|
|
87
123
|
execute(command: any, params?: any[], options?: DriverOptions): Promise<any>;
|
|
88
124
|
beginTransaction(): Promise<Knex.Transaction>;
|
|
125
|
+
/** IDataDriver standard */
|
|
126
|
+
commit(transaction: unknown): Promise<void>;
|
|
127
|
+
/** IDataDriver standard */
|
|
128
|
+
rollback(transaction: unknown): Promise<void>;
|
|
129
|
+
/** @deprecated Use commit() instead */
|
|
89
130
|
commitTransaction(trx: Knex.Transaction): Promise<void>;
|
|
131
|
+
/** @deprecated Use rollback() instead */
|
|
90
132
|
rollbackTransaction(trx: Knex.Transaction): Promise<void>;
|
|
91
133
|
aggregate(object: string, query: any, options?: DriverOptions): Promise<any>;
|
|
92
134
|
distinct(object: string, field: string, filters?: any, options?: DriverOptions): Promise<any[]>;
|
|
93
135
|
findWithWindowFunctions(object: string, query: any, options?: DriverOptions): Promise<any[]>;
|
|
136
|
+
/** IDataDriver standard: analyze query performance */
|
|
137
|
+
explain(object: string, query: any, options?: DriverOptions): Promise<any>;
|
|
94
138
|
analyzeQuery(object: string, query: any, options?: DriverOptions): Promise<any>;
|
|
95
139
|
syncSchema(object: string, schema: unknown, _options?: DriverOptions): Promise<void>;
|
|
140
|
+
dropTable(object: string, _options?: DriverOptions): Promise<void>;
|
|
96
141
|
/**
|
|
97
142
|
* Batch-initialise tables from an array of object definitions.
|
|
98
143
|
*/
|
|
99
144
|
initObjects(objects: Array<{
|
|
100
145
|
name: string;
|
|
146
|
+
tableName?: string;
|
|
101
147
|
fields?: Record<string, any>;
|
|
102
148
|
}>): Promise<void>;
|
|
103
149
|
introspectSchema(): Promise<IntrospectedSchema>;
|
|
104
150
|
/** Expose the underlying Knex instance for advanced usage. */
|
|
105
151
|
getKnex(): Knex;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
152
|
+
protected getBuilder(object: string, options?: DriverOptions): knex.Knex.QueryBuilder<any, {
|
|
153
|
+
_base: any;
|
|
154
|
+
_hasSelection: false;
|
|
155
|
+
_keys: never;
|
|
156
|
+
_aliases: {};
|
|
157
|
+
_single: false;
|
|
158
|
+
_intersectProps: {};
|
|
159
|
+
_unionProps: never;
|
|
160
|
+
}[]>;
|
|
161
|
+
protected applyFilters(builder: Knex.QueryBuilder, filters: any): void;
|
|
162
|
+
protected applyFilterCondition(builder: Knex.QueryBuilder, condition: any, logicalOp?: 'and' | 'or'): void;
|
|
163
|
+
protected mapSortField(field: string): string;
|
|
164
|
+
protected mapAggregateFunc(func: string): string;
|
|
165
|
+
protected buildWindowFunction(spec: any): string;
|
|
166
|
+
protected createColumn(table: Knex.CreateTableBuilder, name: string, field: any): void;
|
|
167
|
+
protected ensureDatabaseExists(): Promise<void>;
|
|
168
|
+
protected createDatabase(): Promise<void>;
|
|
169
|
+
protected isJsonField(type: string, field: any): boolean;
|
|
170
|
+
protected formatInput(object: string, data: any): any;
|
|
171
|
+
protected formatOutput(object: string, data: any): any;
|
|
172
|
+
protected introspectColumns(tableName: string): Promise<IntrospectedColumn[]>;
|
|
173
|
+
protected introspectForeignKeys(tableName: string): Promise<IntrospectedForeignKey[]>;
|
|
174
|
+
protected introspectPrimaryKeys(tableName: string): Promise<string[]>;
|
|
175
|
+
protected introspectUniqueConstraints(tableName: string): Promise<string[]>;
|
|
122
176
|
}
|
|
123
177
|
|
|
124
178
|
declare const _default: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Knex } from 'knex';
|
|
1
|
+
import { QueryAST, DriverOptions } from '@objectstack/spec/data';
|
|
2
|
+
import { IDataDriver } from '@objectstack/spec/contracts';
|
|
3
|
+
import knex, { Knex } from 'knex';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* SQL Driver for ObjectStack
|
|
7
7
|
*
|
|
8
|
-
* Implements the standard
|
|
8
|
+
* Implements the standard IDataDriver from @objectstack/spec via Knex.js.
|
|
9
9
|
* Supports PostgreSQL, MySQL, SQLite, and other SQL databases.
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -41,84 +41,138 @@ type SqlDriverConfig = Knex.Config;
|
|
|
41
41
|
/**
|
|
42
42
|
* SQL Driver for ObjectStack.
|
|
43
43
|
*
|
|
44
|
-
* Implements the
|
|
44
|
+
* Implements the IDataDriver contract via Knex.js for optimal SQL
|
|
45
45
|
* generation against PostgreSQL, MySQL, SQLite and other SQL databases.
|
|
46
46
|
*/
|
|
47
|
-
declare class SqlDriver implements
|
|
48
|
-
readonly name
|
|
49
|
-
readonly version
|
|
47
|
+
declare class SqlDriver implements IDataDriver {
|
|
48
|
+
readonly name: string;
|
|
49
|
+
readonly version: string;
|
|
50
50
|
readonly supports: {
|
|
51
|
+
create: boolean;
|
|
52
|
+
read: boolean;
|
|
53
|
+
update: boolean;
|
|
54
|
+
delete: boolean;
|
|
55
|
+
bulkCreate: boolean;
|
|
56
|
+
bulkUpdate: boolean;
|
|
57
|
+
bulkDelete: boolean;
|
|
51
58
|
transactions: boolean;
|
|
52
|
-
|
|
53
|
-
fullTextSearch: boolean;
|
|
54
|
-
jsonFields: boolean;
|
|
55
|
-
arrayFields: boolean;
|
|
59
|
+
savepoints: boolean;
|
|
56
60
|
queryFilters: boolean;
|
|
57
61
|
queryAggregations: boolean;
|
|
58
62
|
querySorting: boolean;
|
|
59
63
|
queryPagination: boolean;
|
|
60
64
|
queryWindowFunctions: boolean;
|
|
61
65
|
querySubqueries: boolean;
|
|
66
|
+
queryCTE: boolean;
|
|
67
|
+
joins: boolean;
|
|
68
|
+
fullTextSearch: boolean;
|
|
69
|
+
jsonQuery: boolean;
|
|
70
|
+
geospatialQuery: boolean;
|
|
71
|
+
streaming: boolean;
|
|
72
|
+
jsonFields: boolean;
|
|
73
|
+
arrayFields: boolean;
|
|
74
|
+
vectorSearch: boolean;
|
|
75
|
+
schemaSync: boolean;
|
|
76
|
+
migrations: boolean;
|
|
77
|
+
indexes: boolean;
|
|
78
|
+
connectionPooling: boolean;
|
|
79
|
+
preparedStatements: boolean;
|
|
80
|
+
queryCache: boolean;
|
|
62
81
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
82
|
+
protected knex: Knex;
|
|
83
|
+
protected config: Knex.Config;
|
|
84
|
+
protected jsonFields: Record<string, string[]>;
|
|
85
|
+
protected booleanFields: Record<string, string[]>;
|
|
86
|
+
protected tablesWithTimestamps: Set<string>;
|
|
68
87
|
/** Whether the underlying database is a SQLite variant (sqlite3 or better-sqlite3). */
|
|
69
|
-
|
|
88
|
+
protected get isSqlite(): boolean;
|
|
70
89
|
/** Whether the underlying database is PostgreSQL. */
|
|
71
|
-
|
|
90
|
+
protected get isPostgres(): boolean;
|
|
72
91
|
/** Whether the underlying database is MySQL. */
|
|
73
|
-
|
|
92
|
+
protected get isMysql(): boolean;
|
|
74
93
|
constructor(config: SqlDriverConfig);
|
|
75
94
|
connect(): Promise<void>;
|
|
76
95
|
checkHealth(): Promise<boolean>;
|
|
77
96
|
disconnect(): Promise<void>;
|
|
78
|
-
find(object: string, query:
|
|
79
|
-
findOne(object: string, query:
|
|
97
|
+
find(object: string, query: QueryAST, options?: DriverOptions): Promise<any[]>;
|
|
98
|
+
findOne(object: string, query: QueryAST, options?: DriverOptions): Promise<any>;
|
|
99
|
+
/**
|
|
100
|
+
* Stream records matching a structured query.
|
|
101
|
+
* NOTE: Current implementation fetches all results then yields them.
|
|
102
|
+
* TODO: Use Knex .stream() for true cursor-based streaming on large datasets.
|
|
103
|
+
*/
|
|
104
|
+
findStream(object: string, query: QueryAST, options?: DriverOptions): AsyncGenerator<Record<string, any>>;
|
|
80
105
|
create(object: string, data: Record<string, any>, options?: DriverOptions): Promise<any>;
|
|
81
106
|
update(object: string, id: string | number, data: Record<string, any>, options?: DriverOptions): Promise<any>;
|
|
82
|
-
|
|
107
|
+
upsert(object: string, data: Record<string, any>, conflictKeys?: string[], options?: DriverOptions): Promise<Record<string, any>>;
|
|
108
|
+
delete(object: string, id: string | number, options?: DriverOptions): Promise<boolean>;
|
|
83
109
|
bulkCreate(object: string, data: any[], options?: DriverOptions): Promise<any>;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
110
|
+
/**
|
|
111
|
+
* Batch-update multiple records by ID.
|
|
112
|
+
* NOTE: Current implementation performs sequential updates for correctness.
|
|
113
|
+
* TODO: Optimize with SQL CASE statements or batched transactions for performance.
|
|
114
|
+
*/
|
|
115
|
+
bulkUpdate(object: string, updates: Array<{
|
|
116
|
+
id: string | number;
|
|
117
|
+
data: Record<string, any>;
|
|
118
|
+
}>, options?: DriverOptions): Promise<Record<string, any>[]>;
|
|
119
|
+
bulkDelete(object: string, ids: Array<string | number>, options?: DriverOptions): Promise<void>;
|
|
120
|
+
updateMany(object: string, query: QueryAST, data: any, options?: DriverOptions): Promise<number>;
|
|
121
|
+
deleteMany(object: string, query: QueryAST, options?: DriverOptions): Promise<number>;
|
|
122
|
+
count(object: string, query?: QueryAST, options?: DriverOptions): Promise<number>;
|
|
87
123
|
execute(command: any, params?: any[], options?: DriverOptions): Promise<any>;
|
|
88
124
|
beginTransaction(): Promise<Knex.Transaction>;
|
|
125
|
+
/** IDataDriver standard */
|
|
126
|
+
commit(transaction: unknown): Promise<void>;
|
|
127
|
+
/** IDataDriver standard */
|
|
128
|
+
rollback(transaction: unknown): Promise<void>;
|
|
129
|
+
/** @deprecated Use commit() instead */
|
|
89
130
|
commitTransaction(trx: Knex.Transaction): Promise<void>;
|
|
131
|
+
/** @deprecated Use rollback() instead */
|
|
90
132
|
rollbackTransaction(trx: Knex.Transaction): Promise<void>;
|
|
91
133
|
aggregate(object: string, query: any, options?: DriverOptions): Promise<any>;
|
|
92
134
|
distinct(object: string, field: string, filters?: any, options?: DriverOptions): Promise<any[]>;
|
|
93
135
|
findWithWindowFunctions(object: string, query: any, options?: DriverOptions): Promise<any[]>;
|
|
136
|
+
/** IDataDriver standard: analyze query performance */
|
|
137
|
+
explain(object: string, query: any, options?: DriverOptions): Promise<any>;
|
|
94
138
|
analyzeQuery(object: string, query: any, options?: DriverOptions): Promise<any>;
|
|
95
139
|
syncSchema(object: string, schema: unknown, _options?: DriverOptions): Promise<void>;
|
|
140
|
+
dropTable(object: string, _options?: DriverOptions): Promise<void>;
|
|
96
141
|
/**
|
|
97
142
|
* Batch-initialise tables from an array of object definitions.
|
|
98
143
|
*/
|
|
99
144
|
initObjects(objects: Array<{
|
|
100
145
|
name: string;
|
|
146
|
+
tableName?: string;
|
|
101
147
|
fields?: Record<string, any>;
|
|
102
148
|
}>): Promise<void>;
|
|
103
149
|
introspectSchema(): Promise<IntrospectedSchema>;
|
|
104
150
|
/** Expose the underlying Knex instance for advanced usage. */
|
|
105
151
|
getKnex(): Knex;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
152
|
+
protected getBuilder(object: string, options?: DriverOptions): knex.Knex.QueryBuilder<any, {
|
|
153
|
+
_base: any;
|
|
154
|
+
_hasSelection: false;
|
|
155
|
+
_keys: never;
|
|
156
|
+
_aliases: {};
|
|
157
|
+
_single: false;
|
|
158
|
+
_intersectProps: {};
|
|
159
|
+
_unionProps: never;
|
|
160
|
+
}[]>;
|
|
161
|
+
protected applyFilters(builder: Knex.QueryBuilder, filters: any): void;
|
|
162
|
+
protected applyFilterCondition(builder: Knex.QueryBuilder, condition: any, logicalOp?: 'and' | 'or'): void;
|
|
163
|
+
protected mapSortField(field: string): string;
|
|
164
|
+
protected mapAggregateFunc(func: string): string;
|
|
165
|
+
protected buildWindowFunction(spec: any): string;
|
|
166
|
+
protected createColumn(table: Knex.CreateTableBuilder, name: string, field: any): void;
|
|
167
|
+
protected ensureDatabaseExists(): Promise<void>;
|
|
168
|
+
protected createDatabase(): Promise<void>;
|
|
169
|
+
protected isJsonField(type: string, field: any): boolean;
|
|
170
|
+
protected formatInput(object: string, data: any): any;
|
|
171
|
+
protected formatOutput(object: string, data: any): any;
|
|
172
|
+
protected introspectColumns(tableName: string): Promise<IntrospectedColumn[]>;
|
|
173
|
+
protected introspectForeignKeys(tableName: string): Promise<IntrospectedForeignKey[]>;
|
|
174
|
+
protected introspectPrimaryKeys(tableName: string): Promise<string[]>;
|
|
175
|
+
protected introspectUniqueConstraints(tableName: string): Promise<string[]>;
|
|
122
176
|
}
|
|
123
177
|
|
|
124
178
|
declare const _default: {
|