pg-mvc-service 1.0.17 → 1.0.19
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/index.d.ts +83 -80
- package/package.json +1 -1
- package/src/models/Type.ts +1 -1
- package/src/models/ValidateClient.ts +0 -1
package/index.d.ts
CHANGED
|
@@ -17,6 +17,9 @@ export { AwsS3Client } from './src/clients/AwsS3Client';
|
|
|
17
17
|
// models class
|
|
18
18
|
import ValidateClient from './src/models/ValidateClient';
|
|
19
19
|
|
|
20
|
+
import type { TableModel } from "./src/models/TableModel";
|
|
21
|
+
export type { TableModel } from "./src/models/TableModel";
|
|
22
|
+
|
|
20
23
|
import { TColumnAttribute, TColumnType, TColumnArrayType, TColumn, TColumnDetail, TOperator, TColumnInfo, TQuery, TSelectExpression, TAggregateFuncType, TCondition, TNestedCondition, TSortKeyword, TKeyFormat } from './src/models/Type';
|
|
21
24
|
export { TColumnAttribute, TColumnType, TColumnArrayType, TColumn, TColumnDetail, TOperator, TColumnInfo, TQuery, TSelectExpression, TAggregateFuncType, TCondition, TNestedCondition, TSortKeyword, TKeyFormat } from './src/models/Type';
|
|
22
25
|
|
|
@@ -143,86 +146,86 @@ declare module 'pg-mvc-service' {
|
|
|
143
146
|
constructor(errorId: string, message?: string);
|
|
144
147
|
}
|
|
145
148
|
|
|
146
|
-
export class TableModel {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
149
|
+
// export class TableModel {
|
|
150
|
+
// protected readonly dbName: string;
|
|
151
|
+
// get DbName(): string;
|
|
152
|
+
// protected readonly tableName: string;
|
|
153
|
+
// get TableName(): string;
|
|
154
|
+
// protected readonly tableDescription: string;
|
|
155
|
+
// get TableDescription(): string;
|
|
156
|
+
// protected readonly comment: string;
|
|
157
|
+
// get Comment(): string;
|
|
158
|
+
// protected readonly columns: { [key: string]: TColumn };
|
|
159
|
+
// get Columns(): { [key: string]: TColumn };
|
|
160
|
+
// protected readonly references: Array<{table: string, columns: Array<{target: string, ref: string}>}>;
|
|
161
|
+
// get References(): Array<{table: string, columns: Array<{target: string, ref: string}>}>;
|
|
162
|
+
// public GetReferences(columnName: string): Array<{table: string, columns: Array<{target: string, ref: string}>}>;
|
|
163
|
+
// get TableAlias(): string;
|
|
164
|
+
// public IsOutputLog: boolean;
|
|
165
|
+
// public SortKeyword: TSortKeyword;
|
|
166
|
+
// public Offset: number;
|
|
167
|
+
// public Limit: number;
|
|
168
|
+
// public PageCount: number;
|
|
169
|
+
// set OffsetPage(value: number);
|
|
170
|
+
|
|
171
|
+
// constructor(client: Pool);
|
|
172
|
+
// constructor(client: Pool, tableAlias: string);
|
|
173
|
+
// constructor(client: PoolClient);
|
|
174
|
+
// constructor(client: PoolClient, tableAlias: string);
|
|
175
|
+
|
|
176
|
+
// public select(): void;
|
|
177
|
+
// public select(columls: Array<string | {name: string, alias?: string, func?: TAggregateFuncType}> | '*'): void;
|
|
178
|
+
// public select(columls: Array<string | {name: string, alias?: string, func?: TAggregateFuncType}> | '*', model: TableModel): void;
|
|
179
|
+
// public select(columls: Array<string | {name: string, alias?: string, func?: TAggregateFuncType}> | '*', keyFormat: TKeyFormat): void;
|
|
180
|
+
// public select(columls: Array<string | {name: string, alias?: string, func?: TAggregateFuncType}> | '*', model: TableModel, keyFormat: TKeyFormat): void;
|
|
181
|
+
// public select(expression: string, alias: string): void;
|
|
182
|
+
|
|
183
|
+
// public join(joinType: 'left' | 'inner', joinModel: TableModel, conditions: Array<TNestedCondition>): void;
|
|
184
|
+
|
|
185
|
+
// public where(expression: string): void;
|
|
186
|
+
// public where(conditions: Array<TNestedCondition>): void;
|
|
187
|
+
// public where(left: string, operator: TOperator, right: any | TColumnInfo): void;
|
|
188
|
+
// public where(left: TColumnInfo, operator: TOperator, right: any | TColumnInfo): void;
|
|
189
|
+
|
|
190
|
+
// public find<T = {[key: string]: any}>(pk: {[key: string]: any}, selectColumns: Array<string> | "*" | null, selectExpressions: Array<TSelectExpression> | null, keyFormat: TKeyFormat): Promise<T | null>;
|
|
191
|
+
// public find<T = {[key: string]: any}>(pk: {[key: string]: any}, selectColumns: Array<string> | "*" | null, selectExpressions: Array<TSelectExpression> | null): Promise<T | null>;
|
|
192
|
+
// public find<T = {[key: string]: any}>(pk: {[key: string]: any}, selectColumns: Array<string> | "*" | null): Promise<T | null>;
|
|
193
|
+
// public find<T = {[key: string]: any}>(pk: {[key: string]: any}): Promise<T | null>;
|
|
194
|
+
|
|
195
|
+
// public findId<T = {[key: string]: any}>(id: any, selectColumns: Array<string> | "*" | null, selectExpressions: Array<TSelectExpression> | null, keyFormat: TKeyFormat): Promise<T | null>;
|
|
196
|
+
// public findId<T = {[key: string]: any}>(id: any, selectColumns: Array<string> | "*" | null, selectExpressions: Array<TSelectExpression> | null): Promise<T | null>;
|
|
197
|
+
// public findId<T = {[key: string]: any}>(id: any, selectColumns: Array<string> | "*" | null): Promise<T | null>;
|
|
198
|
+
// public findId<T = {[key: string]: any}>(id: any): Promise<T | null>;
|
|
199
|
+
|
|
200
|
+
// protected readonly errorMessages: Record<TColumnType | 'length' | 'null' | 'notInput', string>
|
|
201
|
+
// protected throwValidationError(code: string, message: string): never;
|
|
202
|
+
// protected validateOptions(options: {[key: string]: any}, isInsert: boolean) : Promise<void>;
|
|
203
|
+
// protected validateInsert(options: {[key: string]: any}) : Promise<void>;
|
|
204
|
+
// protected validateUpdate(options: {[key: string]: any}) : Promise<void>;
|
|
205
|
+
// protected validateUpdateId(id: any, options: {[key: string]: any}) : Promise<void>;
|
|
206
|
+
// protected validateDelete() : Promise<void>;
|
|
207
|
+
// protected validateDeleteId(id: any) : Promise<void>;
|
|
208
|
+
|
|
209
|
+
// public executeInsert(options: {[key: string]: any}) : Promise<void>;
|
|
210
|
+
// public executeUpdate(options: {[key: string]: any}) : Promise<number>;
|
|
211
|
+
// public executeUpdateId(id: any, options: {[key: string]: any}) : Promise<void>;
|
|
212
|
+
// public executeDelete() : Promise<number>;
|
|
213
|
+
// public executeDeleteId(id: any) : Promise<void>;
|
|
214
|
+
|
|
215
|
+
// public executeSelect<T = {[key: string]: any}>(): Promise<Array<T>>;
|
|
216
|
+
// public executeSelectWithCount<T = any>(): Promise<{ datas: Array<T>, count: number, lastPage: number}>;
|
|
217
|
+
|
|
218
|
+
// protected executeQuery(param1: string, vars?: Array<any>) : Promise<any>;
|
|
219
|
+
// protected executeQuery(param1: TQuery) : Promise<any>;
|
|
220
|
+
|
|
221
|
+
// public orderBy(column: string | TColumnInfo, sortKeyword: TSortKeyword): void;
|
|
222
|
+
// public orderByList(column: string | TColumnInfo, list: Array<string | number | boolean | null>, sortKeyword: TSortKeyword): void;
|
|
223
|
+
// public orderBySentence(query: string, sortKeyword: TSortKeyword): void;
|
|
224
|
+
|
|
225
|
+
// public groupBy(column: string | TColumnInfo): void;
|
|
226
|
+
|
|
227
|
+
// get ValidateClient(): ValidateClient;
|
|
228
|
+
// }
|
|
226
229
|
|
|
227
230
|
export function createTableDoc(models: Array<TableModel>, serviceName?: string): string;
|
|
228
231
|
export function migrate(migrates: Array<MigrateTable>, poolParam: {
|
package/package.json
CHANGED
package/src/models/Type.ts
CHANGED