@ductape/sdk 0.0.4-v42 → 0.0.4-v44
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/apps/services/app.service.d.ts +10 -0
- package/dist/apps/services/app.service.js +38 -69
- package/dist/apps/services/app.service.js.map +1 -1
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.d.ts +1 -2
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.js +2 -15
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.js.map +1 -1
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.d.ts +1 -2
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.js +2 -14
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.js.map +1 -1
- package/dist/database/adapters/base.adapter.d.ts +176 -0
- package/dist/database/adapters/base.adapter.js +31 -0
- package/dist/database/adapters/base.adapter.js.map +1 -0
- package/dist/database/adapters/dynamodb.adapter.d.ts +91 -0
- package/dist/database/adapters/dynamodb.adapter.js +1469 -0
- package/dist/database/adapters/dynamodb.adapter.js.map +1 -0
- package/dist/database/adapters/mongodb.adapter.d.ts +71 -0
- package/dist/database/adapters/mongodb.adapter.js +882 -0
- package/dist/database/adapters/mongodb.adapter.js.map +1 -0
- package/dist/database/adapters/mysql.adapter.d.ts +146 -0
- package/dist/database/adapters/mysql.adapter.js +1417 -0
- package/dist/database/adapters/mysql.adapter.js.map +1 -0
- package/dist/database/adapters/postgresql.adapter.d.ts +147 -0
- package/dist/database/adapters/postgresql.adapter.js +1472 -0
- package/dist/database/adapters/postgresql.adapter.js.map +1 -0
- package/dist/database/database.service.d.ts +195 -0
- package/dist/database/database.service.js +502 -0
- package/dist/database/database.service.js.map +1 -0
- package/dist/database/index.d.ts +18 -0
- package/dist/database/index.js +98 -0
- package/dist/database/index.js.map +1 -0
- package/dist/database/types/aggregation.types.d.ts +202 -0
- package/dist/database/types/aggregation.types.js +21 -0
- package/dist/database/types/aggregation.types.js.map +1 -0
- package/dist/database/types/connection.types.d.ts +132 -0
- package/dist/database/types/connection.types.js +6 -0
- package/dist/database/types/connection.types.js.map +1 -0
- package/dist/database/types/database.types.d.ts +174 -0
- package/dist/database/types/database.types.js +74 -0
- package/dist/database/types/database.types.js.map +1 -0
- package/dist/database/types/index.d.ts +12 -0
- package/dist/database/types/index.js +37 -0
- package/dist/database/types/index.js.map +1 -0
- package/dist/database/types/index.types.d.ts +220 -0
- package/dist/database/types/index.types.js +27 -0
- package/dist/database/types/index.types.js.map +1 -0
- package/dist/database/types/migration.types.d.ts +205 -0
- package/dist/database/types/migration.types.js +44 -0
- package/dist/database/types/migration.types.js.map +1 -0
- package/dist/database/types/query.types.d.ts +305 -0
- package/dist/database/types/query.types.js +57 -0
- package/dist/database/types/query.types.js.map +1 -0
- package/dist/database/types/result.types.d.ts +218 -0
- package/dist/database/types/result.types.js +6 -0
- package/dist/database/types/result.types.js.map +1 -0
- package/dist/database/types/schema.types.d.ts +190 -0
- package/dist/database/types/schema.types.js +69 -0
- package/dist/database/types/schema.types.js.map +1 -0
- package/dist/database/utils/helpers.d.ts +66 -0
- package/dist/database/utils/helpers.js +501 -0
- package/dist/database/utils/helpers.js.map +1 -0
- package/dist/database/utils/migration.utils.d.ts +151 -0
- package/dist/database/utils/migration.utils.js +476 -0
- package/dist/database/utils/migration.utils.js.map +1 -0
- package/dist/database/utils/transaction.d.ts +64 -0
- package/dist/database/utils/transaction.js +130 -0
- package/dist/database/utils/transaction.js.map +1 -0
- package/dist/database/validators/connection.validator.d.ts +20 -0
- package/dist/database/validators/connection.validator.js +267 -0
- package/dist/database/validators/connection.validator.js.map +1 -0
- package/dist/database/validators/query.validator.d.ts +31 -0
- package/dist/database/validators/query.validator.js +305 -0
- package/dist/database/validators/query.validator.js.map +1 -0
- package/dist/database/validators/schema.validator.d.ts +31 -0
- package/dist/database/validators/schema.validator.js +334 -0
- package/dist/database/validators/schema.validator.js.map +1 -0
- package/dist/index.d.ts +194 -146
- package/dist/index.js +232 -173
- package/dist/index.js.map +1 -1
- package/dist/processor/services/processor.service.js +61 -43
- package/dist/processor/services/processor.service.js.map +1 -1
- package/dist/test/test.processor.js +1 -3
- package/dist/test/test.processor.js.map +1 -1
- package/dist/types/appBuilder.types.d.ts +1 -1
- package/dist/types/processor.types.d.ts +2 -2
- package/package.json +3 -1
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base database adapter interface
|
|
3
|
+
* All database-specific adapters must implement this interface
|
|
4
|
+
*/
|
|
5
|
+
import { DatabaseType, IConnection, IDatabaseConfig } from '../types/database.types';
|
|
6
|
+
import { IQueryOptions, IInsertOptions, IUpdateOptions, IDeleteOptions, IUpsertOptions, IRawQueryOptions } from '../types/query.types';
|
|
7
|
+
import { ICountOptions, ISumOptions, IAvgOptions, IMinOptions, IMaxOptions, IGroupByOptions, IAggregateOptions, IGroupByResult } from '../types/aggregation.types';
|
|
8
|
+
import { ITableSchema, IColumnAlteration, ICreateTableOptions, IAlterTableOptions } from '../types/schema.types';
|
|
9
|
+
import { ICreateIndexOptions, IDropIndexOptions, IListIndexesOptions, IIndexInfo, IIndexStatistics } from '../types/index.types';
|
|
10
|
+
import { IMigrationDefinition, IMigrationExecutionOptions, IMigrationHistory, IMigrationResult } from '../types/migration.types';
|
|
11
|
+
import { IQueryResult, IInsertResult, IUpdateResult, IDeleteResult, IUpsertResult, ISchemaOperationResult, IIndexOperationResult, IRawQueryResult, IConnectionTestResult } from '../types/result.types';
|
|
12
|
+
/**
|
|
13
|
+
* Base database adapter abstract class
|
|
14
|
+
* Provides common functionality and defines required methods
|
|
15
|
+
*/
|
|
16
|
+
export declare abstract class BaseDatabaseAdapter {
|
|
17
|
+
/** Database type this adapter handles */
|
|
18
|
+
abstract readonly type: DatabaseType;
|
|
19
|
+
/**
|
|
20
|
+
* Create and establish a database connection
|
|
21
|
+
*/
|
|
22
|
+
abstract connect(config: IDatabaseConfig): Promise<IConnection>;
|
|
23
|
+
/**
|
|
24
|
+
* Close a database connection
|
|
25
|
+
*/
|
|
26
|
+
abstract disconnect(connection: IConnection): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Test database connection
|
|
29
|
+
*/
|
|
30
|
+
abstract testConnection(connection: IConnection): Promise<IConnectionTestResult>;
|
|
31
|
+
/**
|
|
32
|
+
* Begin a new transaction
|
|
33
|
+
*/
|
|
34
|
+
abstract beginTransaction(connection: IConnection, options?: any): Promise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* Commit a transaction
|
|
37
|
+
*/
|
|
38
|
+
abstract commitTransaction(connection: IConnection, transaction: any): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Rollback a transaction
|
|
41
|
+
*/
|
|
42
|
+
abstract rollbackTransaction(connection: IConnection, transaction: any): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Create a savepoint within a transaction
|
|
45
|
+
*/
|
|
46
|
+
abstract createSavepoint(connection: IConnection, transaction: any, savepointName: string): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Rollback to a savepoint
|
|
49
|
+
*/
|
|
50
|
+
abstract rollbackToSavepoint(connection: IConnection, transaction: any, savepointName: string): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Release a savepoint
|
|
53
|
+
*/
|
|
54
|
+
abstract releaseSavepoint(connection: IConnection, transaction: any, savepointName: string): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Execute a callback within a transaction
|
|
57
|
+
* Automatically commits on success or rolls back on error
|
|
58
|
+
*/
|
|
59
|
+
executeTransaction<T>(connection: IConnection, callback: (transaction: any) => Promise<T>, options?: any): Promise<T>;
|
|
60
|
+
/**
|
|
61
|
+
* Execute a select query
|
|
62
|
+
*/
|
|
63
|
+
abstract query<T = any>(connection: IConnection, options: IQueryOptions): Promise<IQueryResult<T>>;
|
|
64
|
+
/**
|
|
65
|
+
* Insert records
|
|
66
|
+
*/
|
|
67
|
+
abstract insert<T = any>(connection: IConnection, options: IInsertOptions): Promise<IInsertResult<T>>;
|
|
68
|
+
/**
|
|
69
|
+
* Update records
|
|
70
|
+
*/
|
|
71
|
+
abstract update<T = any>(connection: IConnection, options: IUpdateOptions): Promise<IUpdateResult<T>>;
|
|
72
|
+
/**
|
|
73
|
+
* Delete records
|
|
74
|
+
*/
|
|
75
|
+
abstract delete<T = any>(connection: IConnection, options: IDeleteOptions): Promise<IDeleteResult<T>>;
|
|
76
|
+
/**
|
|
77
|
+
* Upsert records (insert or update)
|
|
78
|
+
*/
|
|
79
|
+
abstract upsert<T = any>(connection: IConnection, options: IUpsertOptions): Promise<IUpsertResult<T>>;
|
|
80
|
+
/**
|
|
81
|
+
* Execute raw SQL/query
|
|
82
|
+
*/
|
|
83
|
+
abstract executeRaw<T = any>(connection: IConnection, options: IRawQueryOptions): Promise<IRawQueryResult<T>>;
|
|
84
|
+
/**
|
|
85
|
+
* Count records
|
|
86
|
+
*/
|
|
87
|
+
abstract count(connection: IConnection, options: ICountOptions): Promise<number>;
|
|
88
|
+
/**
|
|
89
|
+
* Sum column values
|
|
90
|
+
*/
|
|
91
|
+
abstract sum(connection: IConnection, options: ISumOptions): Promise<number>;
|
|
92
|
+
/**
|
|
93
|
+
* Get average of column values
|
|
94
|
+
*/
|
|
95
|
+
abstract avg(connection: IConnection, options: IAvgOptions): Promise<number>;
|
|
96
|
+
/**
|
|
97
|
+
* Get minimum value
|
|
98
|
+
*/
|
|
99
|
+
abstract min(connection: IConnection, options: IMinOptions): Promise<number | string>;
|
|
100
|
+
/**
|
|
101
|
+
* Get maximum value
|
|
102
|
+
*/
|
|
103
|
+
abstract max(connection: IConnection, options: IMaxOptions): Promise<number | string>;
|
|
104
|
+
/**
|
|
105
|
+
* Group by and aggregate
|
|
106
|
+
*/
|
|
107
|
+
abstract groupBy(connection: IConnection, options: IGroupByOptions): Promise<IGroupByResult[]>;
|
|
108
|
+
/**
|
|
109
|
+
* Multiple aggregations in one query
|
|
110
|
+
*/
|
|
111
|
+
abstract aggregate(connection: IConnection, options: IAggregateOptions): Promise<Record<string, any>>;
|
|
112
|
+
/**
|
|
113
|
+
* Create a table/collection
|
|
114
|
+
*/
|
|
115
|
+
abstract createTable(connection: IConnection, schema: ITableSchema, options?: ICreateTableOptions): Promise<ISchemaOperationResult>;
|
|
116
|
+
/**
|
|
117
|
+
* Drop a table/collection
|
|
118
|
+
*/
|
|
119
|
+
abstract dropTable(connection: IConnection, tableName: string): Promise<ISchemaOperationResult>;
|
|
120
|
+
/**
|
|
121
|
+
* Alter table (add/modify/drop columns)
|
|
122
|
+
*/
|
|
123
|
+
abstract alterTable(connection: IConnection, tableName: string, alterations: IColumnAlteration[], options?: IAlterTableOptions): Promise<ISchemaOperationResult>;
|
|
124
|
+
/**
|
|
125
|
+
* Get table schema
|
|
126
|
+
*/
|
|
127
|
+
abstract getTableSchema(connection: IConnection, tableName: string): Promise<ITableSchema>;
|
|
128
|
+
/**
|
|
129
|
+
* List all tables/collections
|
|
130
|
+
*/
|
|
131
|
+
abstract listTables(connection: IConnection): Promise<string[]>;
|
|
132
|
+
/**
|
|
133
|
+
* Check if table exists
|
|
134
|
+
*/
|
|
135
|
+
abstract tableExists(connection: IConnection, tableName: string): Promise<boolean>;
|
|
136
|
+
/**
|
|
137
|
+
* Create an index
|
|
138
|
+
*/
|
|
139
|
+
abstract createIndex(connection: IConnection, options: ICreateIndexOptions): Promise<IIndexOperationResult>;
|
|
140
|
+
/**
|
|
141
|
+
* Drop an index
|
|
142
|
+
*/
|
|
143
|
+
abstract dropIndex(connection: IConnection, options: IDropIndexOptions): Promise<IIndexOperationResult>;
|
|
144
|
+
/**
|
|
145
|
+
* List indexes for a table
|
|
146
|
+
*/
|
|
147
|
+
abstract listIndexes(connection: IConnection, options: IListIndexesOptions): Promise<IIndexInfo[]>;
|
|
148
|
+
/**
|
|
149
|
+
* Get index statistics
|
|
150
|
+
*/
|
|
151
|
+
abstract getIndexStatistics(connection: IConnection, tableName: string, indexName?: string): Promise<IIndexStatistics[]>;
|
|
152
|
+
/**
|
|
153
|
+
* Run a migration
|
|
154
|
+
*/
|
|
155
|
+
abstract runMigration(connection: IConnection, migration: IMigrationDefinition, options: IMigrationExecutionOptions): Promise<IMigrationResult>;
|
|
156
|
+
/**
|
|
157
|
+
* Rollback a migration
|
|
158
|
+
*/
|
|
159
|
+
abstract rollbackMigration(connection: IConnection, migration: IMigrationDefinition, options: IMigrationExecutionOptions): Promise<IMigrationResult>;
|
|
160
|
+
/**
|
|
161
|
+
* Get migration history
|
|
162
|
+
*/
|
|
163
|
+
abstract getMigrationHistory(connection: IConnection, options: IMigrationExecutionOptions): Promise<IMigrationHistory[]>;
|
|
164
|
+
/**
|
|
165
|
+
* Escape identifier (table/column name)
|
|
166
|
+
*/
|
|
167
|
+
abstract escapeIdentifier(identifier: string): string;
|
|
168
|
+
/**
|
|
169
|
+
* Escape value
|
|
170
|
+
*/
|
|
171
|
+
abstract escapeValue(value: any): string;
|
|
172
|
+
/**
|
|
173
|
+
* Get database version
|
|
174
|
+
*/
|
|
175
|
+
abstract getDatabaseVersion(connection: IConnection): Promise<string>;
|
|
176
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Base database adapter interface
|
|
4
|
+
* All database-specific adapters must implement this interface
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.BaseDatabaseAdapter = void 0;
|
|
8
|
+
/**
|
|
9
|
+
* Base database adapter abstract class
|
|
10
|
+
* Provides common functionality and defines required methods
|
|
11
|
+
*/
|
|
12
|
+
class BaseDatabaseAdapter {
|
|
13
|
+
/**
|
|
14
|
+
* Execute a callback within a transaction
|
|
15
|
+
* Automatically commits on success or rolls back on error
|
|
16
|
+
*/
|
|
17
|
+
async executeTransaction(connection, callback, options) {
|
|
18
|
+
const transaction = await this.beginTransaction(connection, options);
|
|
19
|
+
try {
|
|
20
|
+
const result = await callback(transaction);
|
|
21
|
+
await this.commitTransaction(connection, transaction);
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
await this.rollbackTransaction(connection, transaction);
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.BaseDatabaseAdapter = BaseDatabaseAdapter;
|
|
31
|
+
//# sourceMappingURL=base.adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.adapter.js","sourceRoot":"","sources":["../../../src/database/adapters/base.adapter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwDH;;;GAGG;AACH,MAAsB,mBAAmB;IAoEvC;;;OAGG;IACH,KAAK,CAAC,kBAAkB,CACtB,UAAuB,EACvB,QAA0C,EAC1C,OAAa;QAEb,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAErE,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,CAAC;YAC3C,MAAM,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;YACtD,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;YACxD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CAmOF;AA1TD,kDA0TC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DynamoDB Database Adapter
|
|
3
|
+
* Implements database operations for Amazon DynamoDB
|
|
4
|
+
*/
|
|
5
|
+
import { BaseDatabaseAdapter } from './base.adapter';
|
|
6
|
+
import { DatabaseType, IConnection, IDatabaseConfig } from '../types/database.types';
|
|
7
|
+
import { IQueryOptions, IInsertOptions, IUpdateOptions, IDeleteOptions, IUpsertOptions, IRawQueryOptions } from '../types/query.types';
|
|
8
|
+
import { ICountOptions, ISumOptions, IAvgOptions, IMinOptions, IMaxOptions, IGroupByOptions, IAggregateOptions, IGroupByResult } from '../types/aggregation.types';
|
|
9
|
+
import { ITableSchema, IColumnAlteration, ICreateTableOptions, IAlterTableOptions } from '../types/schema.types';
|
|
10
|
+
import { ICreateIndexOptions, IDropIndexOptions, IListIndexesOptions, IIndexInfo, IIndexStatistics } from '../types/index.types';
|
|
11
|
+
import { IMigrationDefinition, IMigrationExecutionOptions, IMigrationHistory, IMigrationResult } from '../types/migration.types';
|
|
12
|
+
import { IQueryResult, IInsertResult, IUpdateResult, IDeleteResult, IUpsertResult, ISchemaOperationResult, IIndexOperationResult, IRawQueryResult, IConnectionTestResult } from '../types/result.types';
|
|
13
|
+
/**
|
|
14
|
+
* DynamoDB Database Adapter
|
|
15
|
+
*/
|
|
16
|
+
export declare class DynamoDBAdapter extends BaseDatabaseAdapter {
|
|
17
|
+
readonly type = DatabaseType.DYNAMODB;
|
|
18
|
+
connect(config: IDatabaseConfig): Promise<IConnection>;
|
|
19
|
+
disconnect(connection: IConnection): Promise<void>;
|
|
20
|
+
testConnection(connection: IConnection): Promise<IConnectionTestResult>;
|
|
21
|
+
beginTransaction(connection: IConnection, options?: any): Promise<any>;
|
|
22
|
+
commitTransaction(connection: IConnection, transaction: any): Promise<void>;
|
|
23
|
+
rollbackTransaction(connection: IConnection, transaction: any): Promise<void>;
|
|
24
|
+
createSavepoint(connection: IConnection, transaction: any, savepointName: string): Promise<void>;
|
|
25
|
+
rollbackToSavepoint(connection: IConnection, transaction: any, savepointName: string): Promise<void>;
|
|
26
|
+
releaseSavepoint(connection: IConnection, transaction: any, savepointName: string): Promise<void>;
|
|
27
|
+
query<T = any>(connection: IConnection, options: IQueryOptions): Promise<IQueryResult<T>>;
|
|
28
|
+
insert<T = any>(connection: IConnection, options: IInsertOptions): Promise<IInsertResult<T>>;
|
|
29
|
+
update<T = any>(connection: IConnection, options: IUpdateOptions): Promise<IUpdateResult<T>>;
|
|
30
|
+
delete<T = any>(connection: IConnection, options: IDeleteOptions): Promise<IDeleteResult<T>>;
|
|
31
|
+
upsert<T = any>(connection: IConnection, options: IUpsertOptions): Promise<IUpsertResult<T>>;
|
|
32
|
+
executeRaw<T = any>(connection: IConnection, options: IRawQueryOptions): Promise<IRawQueryResult<T>>;
|
|
33
|
+
count(connection: IConnection, options: ICountOptions): Promise<number>;
|
|
34
|
+
sum(connection: IConnection, options: ISumOptions): Promise<number>;
|
|
35
|
+
avg(connection: IConnection, options: IAvgOptions): Promise<number>;
|
|
36
|
+
min(connection: IConnection, options: IMinOptions): Promise<number | string>;
|
|
37
|
+
max(connection: IConnection, options: IMaxOptions): Promise<number | string>;
|
|
38
|
+
groupBy(connection: IConnection, options: IGroupByOptions): Promise<IGroupByResult[]>;
|
|
39
|
+
aggregate(connection: IConnection, options: IAggregateOptions): Promise<Record<string, any>>;
|
|
40
|
+
createTable(connection: IConnection, schema: ITableSchema, options?: ICreateTableOptions): Promise<ISchemaOperationResult>;
|
|
41
|
+
dropTable(connection: IConnection, tableName: string): Promise<ISchemaOperationResult>;
|
|
42
|
+
alterTable(connection: IConnection, tableName: string, alterations: IColumnAlteration[], options?: IAlterTableOptions): Promise<ISchemaOperationResult>;
|
|
43
|
+
getTableSchema(connection: IConnection, tableName: string): Promise<ITableSchema>;
|
|
44
|
+
listTables(connection: IConnection): Promise<string[]>;
|
|
45
|
+
tableExists(connection: IConnection, tableName: string): Promise<boolean>;
|
|
46
|
+
createIndex(connection: IConnection, options: ICreateIndexOptions): Promise<IIndexOperationResult>;
|
|
47
|
+
dropIndex(connection: IConnection, options: IDropIndexOptions): Promise<IIndexOperationResult>;
|
|
48
|
+
listIndexes(connection: IConnection, options: IListIndexesOptions): Promise<IIndexInfo[]>;
|
|
49
|
+
getIndexStatistics(connection: IConnection, tableName: string, indexName?: string): Promise<IIndexStatistics[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Execute a migration operation
|
|
52
|
+
* Note: DynamoDB is schema-less, so column operations are skipped
|
|
53
|
+
*/
|
|
54
|
+
private executeMigrationOperation;
|
|
55
|
+
runMigration(connection: IConnection, migration: IMigrationDefinition, options: IMigrationExecutionOptions): Promise<IMigrationResult>;
|
|
56
|
+
rollbackMigration(connection: IConnection, migration: IMigrationDefinition, options: IMigrationExecutionOptions): Promise<IMigrationResult>;
|
|
57
|
+
getMigrationHistory(connection: IConnection, options: IMigrationExecutionOptions): Promise<IMigrationHistory[]>;
|
|
58
|
+
/**
|
|
59
|
+
* Ensure migration tracking table exists
|
|
60
|
+
*/
|
|
61
|
+
private ensureMigrationTable;
|
|
62
|
+
/**
|
|
63
|
+
* Record migration execution
|
|
64
|
+
*/
|
|
65
|
+
private recordMigration;
|
|
66
|
+
/**
|
|
67
|
+
* Remove migration from history
|
|
68
|
+
*/
|
|
69
|
+
private removeMigration;
|
|
70
|
+
private hasPartitionKeyInWhere;
|
|
71
|
+
private buildQueryParams;
|
|
72
|
+
private buildScanParams;
|
|
73
|
+
/**
|
|
74
|
+
* Build DynamoDB key condition expression (for Query operations)
|
|
75
|
+
* Supports both simplified syntax (GT, LT, etc.) and legacy $ prefix operators
|
|
76
|
+
*/
|
|
77
|
+
private buildKeyConditionExpression;
|
|
78
|
+
/**
|
|
79
|
+
* Build DynamoDB filter expression (for Scan and Query operations)
|
|
80
|
+
* Supports both simplified syntax (GT, LT, AND, OR, etc.) and legacy $ prefix operators
|
|
81
|
+
*/
|
|
82
|
+
private buildFilterExpression;
|
|
83
|
+
private buildUpdateExpression;
|
|
84
|
+
private extractKeyFromWhere;
|
|
85
|
+
private chunkArray;
|
|
86
|
+
private mapColumnTypeToDynamoDB;
|
|
87
|
+
private mapDynamoDBTypeToColumnType;
|
|
88
|
+
escapeIdentifier(identifier: string): string;
|
|
89
|
+
escapeValue(value: any): string;
|
|
90
|
+
getDatabaseVersion(connection: IConnection): Promise<string>;
|
|
91
|
+
}
|