PawSQLite/src/result.mjs
2021-03-01 18:47:07 -08:00

19 lines
420 B
JavaScript

import { PawSQLiteError } from "./pawsqlite_error.mjs";
export class Result extends Array {
constructor(result) {
if (result.hasOwnProperty("rows")) {
super(...result.rows);
} else {
super();
}
if (result.hasOwnProperty("insertId")) {
this.insertId = result.insertId;
}
if (result.hasOwnProperty("rowsAffected")) {
this.rowsAffected = result.rowsAffected;
}
}
}