File tree Expand file tree Collapse file tree 17 files changed +41
-41
lines changed Expand file tree Collapse file tree 17 files changed +41
-41
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ export async function generateModelString(
194
194
.selectAll()
195
195
.execute()
196
196
197
- return results.map((modelItem) => new ${ modelRelation } (modelItem))
197
+ return results.map((modelItem: ${ modelName } Model ) => new ${ modelRelation } (modelItem))
198
198
}\n\n`
199
199
}
200
200
@@ -1751,7 +1751,7 @@ export async function generateModelString(
1751
1751
}
1752
1752
1753
1753
static async rawQuery(rawQuery: string): Promise<any> {
1754
- return await sql\`\${rawQuery}\`\.execute(db )
1754
+ return await sql\`\${rawQuery}\`\.execute(DB.instance )
1755
1755
}
1756
1756
1757
1757
toJSON(): Partial<${ modelName } JsonResponse> {
@@ -1797,7 +1797,7 @@ export async function generateModelString(
1797
1797
}
1798
1798
1799
1799
export async function rawQuery(rawQuery: string): Promise<any> {
1800
- return await sql\`\${rawQuery}\`\.execute(db )
1800
+ return await sql\`\${rawQuery}\`\.execute(DB.instance )
1801
1801
}
1802
1802
1803
1803
export async function remove(id: number): Promise<void> {
Original file line number Diff line number Diff line change @@ -1112,7 +1112,7 @@ export class AccessTokenModel {
1112
1112
}
1113
1113
1114
1114
static async rawQuery ( rawQuery : string ) : Promise < any > {
1115
- return await sql `${ rawQuery } ` . execute ( db )
1115
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1116
1116
}
1117
1117
1118
1118
toJSON ( ) : Partial < AccessTokenJsonResponse > {
@@ -1171,7 +1171,7 @@ export async function create(newAccessToken: NewAccessToken): Promise<AccessToke
1171
1171
}
1172
1172
1173
1173
export async function rawQuery ( rawQuery : string ) : Promise < any > {
1174
- return await sql `${ rawQuery } ` . execute ( db )
1174
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1175
1175
}
1176
1176
1177
1177
export async function remove ( id : number ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -1150,7 +1150,7 @@ export class DeploymentModel {
1150
1150
}
1151
1151
1152
1152
static async rawQuery ( rawQuery : string ) : Promise < any > {
1153
- return await sql `${ rawQuery } ` . execute ( db )
1153
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1154
1154
}
1155
1155
1156
1156
toJSON ( ) : Partial < DeploymentJsonResponse > {
@@ -1212,7 +1212,7 @@ export async function create(newDeployment: NewDeployment): Promise<DeploymentMo
1212
1212
}
1213
1213
1214
1214
export async function rawQuery ( rawQuery : string ) : Promise < any > {
1215
- return await sql `${ rawQuery } ` . execute ( db )
1215
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1216
1216
}
1217
1217
1218
1218
export async function remove ( id : number ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -1096,7 +1096,7 @@ export class ErrorModel {
1096
1096
}
1097
1097
1098
1098
static async rawQuery ( rawQuery : string ) : Promise < any > {
1099
- return await sql `${ rawQuery } ` . execute ( db )
1099
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1100
1100
}
1101
1101
1102
1102
toJSON ( ) : Partial < ErrorJsonResponse > {
@@ -1154,7 +1154,7 @@ export async function create(newError: NewError): Promise<ErrorModel> {
1154
1154
}
1155
1155
1156
1156
export async function rawQuery ( rawQuery : string ) : Promise < any > {
1157
- return await sql `${ rawQuery } ` . execute ( db )
1157
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1158
1158
}
1159
1159
1160
1160
export async function remove ( id : number ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -1096,7 +1096,7 @@ export class FailedJobModel {
1096
1096
}
1097
1097
1098
1098
static async rawQuery ( rawQuery : string ) : Promise < any > {
1099
- return await sql `${ rawQuery } ` . execute ( db )
1099
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1100
1100
}
1101
1101
1102
1102
toJSON ( ) : Partial < FailedJobJsonResponse > {
@@ -1154,7 +1154,7 @@ export async function create(newFailedJob: NewFailedJob): Promise<FailedJobModel
1154
1154
}
1155
1155
1156
1156
export async function rawQuery ( rawQuery : string ) : Promise < any > {
1157
- return await sql `${ rawQuery } ` . execute ( db )
1157
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1158
1158
}
1159
1159
1160
1160
export async function remove ( id : number ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -1096,7 +1096,7 @@ export class JobModel {
1096
1096
}
1097
1097
1098
1098
static async rawQuery ( rawQuery : string ) : Promise < any > {
1099
- return await sql `${ rawQuery } ` . execute ( db )
1099
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1100
1100
}
1101
1101
1102
1102
toJSON ( ) : Partial < JobJsonResponse > {
@@ -1154,7 +1154,7 @@ export async function create(newJob: NewJob): Promise<JobModel> {
1154
1154
}
1155
1155
1156
1156
export async function rawQuery ( rawQuery : string ) : Promise < any > {
1157
- return await sql `${ rawQuery } ` . execute ( db )
1157
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1158
1158
}
1159
1159
1160
1160
export async function remove ( id : number ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -1144,7 +1144,7 @@ export class PaymentMethodModel {
1144
1144
. selectAll ( )
1145
1145
. execute ( )
1146
1146
1147
- return results . map ( modelItem => new Transaction ( modelItem ) )
1147
+ return results . map ( ( modelItem : PaymentMethodModel ) => new Transaction ( modelItem ) )
1148
1148
}
1149
1149
1150
1150
distinct ( column : keyof PaymentMethodType ) : PaymentMethodModel {
@@ -1174,7 +1174,7 @@ export class PaymentMethodModel {
1174
1174
}
1175
1175
1176
1176
static async rawQuery ( rawQuery : string ) : Promise < any > {
1177
- return await sql `${ rawQuery } ` . execute ( db )
1177
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1178
1178
}
1179
1179
1180
1180
toJSON ( ) : Partial < PaymentMethodJsonResponse > {
@@ -1237,7 +1237,7 @@ export async function create(newPaymentMethod: NewPaymentMethod): Promise<Paymen
1237
1237
}
1238
1238
1239
1239
export async function rawQuery ( rawQuery : string ) : Promise < any > {
1240
- return await sql `${ rawQuery } ` . execute ( db )
1240
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1241
1241
}
1242
1242
1243
1243
export async function remove ( id : number ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -1090,7 +1090,7 @@ export class PostModel {
1090
1090
}
1091
1091
1092
1092
static async rawQuery ( rawQuery : string ) : Promise < any > {
1093
- return await sql `${ rawQuery } ` . execute ( db )
1093
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1094
1094
}
1095
1095
1096
1096
toJSON ( ) : Partial < PostJsonResponse > {
@@ -1147,7 +1147,7 @@ export async function create(newPost: NewPost): Promise<PostModel> {
1147
1147
}
1148
1148
1149
1149
export async function rawQuery ( rawQuery : string ) : Promise < any > {
1150
- return await sql `${ rawQuery } ` . execute ( db )
1150
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1151
1151
}
1152
1152
1153
1153
export async function remove ( id : number ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -1123,7 +1123,7 @@ export class ProductModel {
1123
1123
}
1124
1124
1125
1125
static async rawQuery ( rawQuery : string ) : Promise < any > {
1126
- return await sql `${ rawQuery } ` . execute ( db )
1126
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1127
1127
}
1128
1128
1129
1129
toJSON ( ) : Partial < ProductJsonResponse > {
@@ -1183,7 +1183,7 @@ export async function create(newProduct: NewProduct): Promise<ProductModel> {
1183
1183
}
1184
1184
1185
1185
export async function rawQuery ( rawQuery : string ) : Promise < any > {
1186
- return await sql `${ rawQuery } ` . execute ( db )
1186
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1187
1187
}
1188
1188
1189
1189
export async function remove ( id : number ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -1085,7 +1085,7 @@ export class ProjectModel {
1085
1085
}
1086
1086
1087
1087
static async rawQuery ( rawQuery : string ) : Promise < any > {
1088
- return await sql `${ rawQuery } ` . execute ( db )
1088
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1089
1089
}
1090
1090
1091
1091
toJSON ( ) : Partial < ProjectJsonResponse > {
@@ -1142,7 +1142,7 @@ export async function create(newProject: NewProject): Promise<ProjectModel> {
1142
1142
}
1143
1143
1144
1144
export async function rawQuery ( rawQuery : string ) : Promise < any > {
1145
- return await sql `${ rawQuery } ` . execute ( db )
1145
+ return await sql `${ rawQuery } ` . execute ( DB . instance )
1146
1146
}
1147
1147
1148
1148
export async function remove ( id : number ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments