19 lines
420 B
JavaScript
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;
|
|
}
|
|
}
|
|
} |