PawSQLite/src/result.mjs

19 lines
420 B
JavaScript
Raw Normal View History

2021-03-01 18:47:07 -08:00
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;
}
}
}