changed to es6 #14
2 changed files with 4 additions and 2 deletions
|
@ -101,7 +101,7 @@ export class selectQuery {
|
||||||
const builder = this.serialize(handler);
|
const builder = this.serialize(handler);
|
||||||
const s = handler.builders.query(builder);
|
const s = handler.builders.query(builder);
|
||||||
let readResp = await db.query(s, printQuery);
|
let readResp = await db.query(s, printQuery);
|
||||||
return db.getHandler().responses.readResponse(readResp);
|
return handler.responses.readResponse(readResp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,9 @@ export class singleResponse {
|
||||||
export class readResponse extends Array<singleResponse>{
|
export class readResponse extends Array<singleResponse>{
|
||||||
constructor(rows: ({ [key: string]: primaryData })[]) {
|
constructor(rows: ({ [key: string]: primaryData })[]) {
|
||||||
super();
|
super();
|
||||||
this.push(...rows.map(r => new singleResponse(r)));
|
for(let i = 0; i < rows.length; i++){
|
||||||
|
this[i] = new singleResponse(rows[i])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue