|
|
@@ -163,6 +163,12 @@ DatabaseHelper.prototype.fetch = async function(objectPrototype, where, orderBy)
|
|
|
return resultArr;
|
|
|
}
|
|
|
|
|
|
+DatabaseHelper.prototype.remove = async function(objectPrototype, where) {
|
|
|
+ let whereArgs = this.buildWhere(where);
|
|
|
+ let query = "delete from `" +objectPrototype.prototype.getTableName.call(null) +"` where " +whereArgs.columns.join(" and ");
|
|
|
+ return await this.runSql(query, whereArgs.args, false);
|
|
|
+}
|
|
|
+
|
|
|
DatabaseHelper.prototype.fetchRaw = async function(columns, tableName, where, orderBy) {
|
|
|
let whereArgs = this.buildWhere(where);
|
|
|
let query = "select " + (Array.isArray(columns) ? columns.join(","): columns) +" from `" +tableName +"` where " +whereArgs.columns.join(" and ");
|