Add feature to list all frames and another to find others with a WHERE statement.
This commit is contained in:
parent
cd3f79a3a0
commit
64389ab954
|
@ -30,6 +30,19 @@ class DB {
|
||||||
.toString()
|
.toString()
|
||||||
db.run(query)
|
db.run(query)
|
||||||
}
|
}
|
||||||
|
find (where, cb) {
|
||||||
|
const query.select()
|
||||||
|
.from(this._table)
|
||||||
|
.where(where)
|
||||||
|
.toString()
|
||||||
|
db.all(query, cb)
|
||||||
|
}
|
||||||
|
list (cb) {
|
||||||
|
const query.select()
|
||||||
|
.from(this._table)
|
||||||
|
.toString()
|
||||||
|
db.all(query, cb)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = new DB()
|
module.exports = new DB()
|
Loading…
Reference in New Issue