@iamkirbki/database-handler-core 3.1.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,7 +32,7 @@ export default class Model {
32
32
  }
33
33
  all() {
34
34
  return __awaiter(this, void 0, void 0, function* () {
35
- const records = yield this.Table.Records();
35
+ const records = yield this.Table.Records({ where: this.QueryParams });
36
36
  return records.map(record => record.values);
37
37
  });
38
38
  }
@@ -208,7 +208,7 @@ export default class QueryStatementBuilder {
208
208
  * ```
209
209
  */
210
210
  static BuildWhere(where) {
211
- if (!where)
211
+ if (!where || Object.keys(where).length === 0)
212
212
  return "";
213
213
  const queryParts = [];
214
214
  const whereClauses = Object.keys(where).map(col => `${col} = @${col}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamkirbki/database-handler-core",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "author": "iamkirbki",
5
5
  "description": "Core database abstractions and interfaces",
6
6
  "license": "ISC",