@@ -111,14 +111,21 @@ export class DatabaseError extends Error implements NoticeOrError {
111
111
public file: string | undefined
112
112
public line: string | undefined
113
113
public routine: string | undefined
114
- constructor(message: string, public readonly length: number, public readonly name: MessageName) {
114
+ constructor(
115
+ message: string,
116
+ public readonly length: number,
117
+ public readonly name: MessageName
118
+ ) {
115
119
super(message)
116
120
}
117
121
}
118
122
119
123
export class CopyDataMessage {
120
124
public readonly name = 'copyData'
121
- constructor(public readonly length: number, public readonly chunk: Buffer) {}
125
+ constructor(
126
+ public readonly length: number,
127
+ public readonly chunk: Buffer
128
+ ) {}
122
129
}
123
130
124
131
export class CopyResponse {
@@ -148,15 +155,21 @@ export class Field {
148
155
export class RowDescriptionMessage {
149
156
public readonly name: MessageName = 'rowDescription'
150
157
public readonly fields: Field[]
151
- constructor(public readonly length: number, public readonly fieldCount: number) {
158
+ constructor(
159
+ public readonly length: number,
160
+ public readonly fieldCount: number
161
+ ) {
152
162
this.fields = new Array(this.fieldCount)
153
163
}
154
164
}
155
165
156
166
export class ParameterDescriptionMessage {
157
167
public readonly name: MessageName = 'parameterDescription'
158
168
public readonly dataTypeIDs: number[]
159
- constructor(public readonly length: number, public readonly parameterCount: number) {
169
+ constructor(
170
+ public readonly length: number,
171
+ public readonly parameterCount: number
172
+ ) {
160
173
this.dataTypeIDs = new Array(this.parameterCount)
161
174
}
162
175
}
@@ -172,12 +185,19 @@ export class ParameterStatusMessage {
172
185
173
186
export class AuthenticationMD5Password implements BackendMessage {
174
187
public readonly name: MessageName = 'authenticationMD5Password'
175
- constructor(public readonly length: number, public readonly salt: Buffer) {}
188
+ constructor(
189
+ public readonly length: number,
190
+ public readonly salt: Buffer
191
+ ) {}
176
192
}
177
193
178
194
export class BackendKeyDataMessage {
179
195
public readonly name: MessageName = 'backendKeyData'
180
- constructor(public readonly length: number, public readonly processID: number, public readonly secretKey: number) {}
196
+ constructor(
197
+ public readonly length: number,
198
+ public readonly processID: number,
199
+ public readonly secretKey: number
200
+ ) {}
181
201
}
182
202
183
203
export class NotificationResponseMessage {
@@ -192,24 +212,36 @@ export class NotificationResponseMessage {
192
212
193
213
export class ReadyForQueryMessage {
194
214
public readonly name: MessageName = 'readyForQuery'
195
- constructor(public readonly length: number, public readonly status: string) {}
215
+ constructor(
216
+ public readonly length: number,
217
+ public readonly status: string
218
+ ) {}
196
219
}
197
220
198
221
export class CommandCompleteMessage {
199
222
public readonly name: MessageName = 'commandComplete'
200
- constructor(public readonly length: number, public readonly text: string) {}
223
+ constructor(
224
+ public readonly length: number,
225
+ public readonly text: string
226
+ ) {}
201
227
}
202
228
203
229
export class DataRowMessage {
204
230
public readonly fieldCount: number
205
231
public readonly name: MessageName = 'dataRow'
206
- constructor(public length: number, public fields: any[]) {
232
+ constructor(
233
+ public length: number,
234
+ public fields: any[]
235
+ ) {
207
236
this.fieldCount = fields.length
208
237
}
209
238
}
210
239
211
240
export class NoticeMessage implements BackendMessage, NoticeOrError {
212
- constructor(public readonly length: number, public readonly message: string | undefined) {}
241
+ constructor(
242
+ public readonly length: number,
243
+ public readonly message: string | undefined
244
+ ) {}
213
245
public readonly name = 'notice'
214
246
public severity: string | undefined
215
247
public code: string | undefined
0 commit comments