Skip to content

Commit

Permalink
feat: provide support for groupby
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
  • Loading branch information
aaqilniz committed Dec 28, 2023
1 parent ae3cf25 commit 53a31da
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/dao.js
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,18 @@ DataAccessObject.find = function find(query, options, cb) {
delete obj.__data.__cachedRelations;
}
}

const keys = Object.keys(data);
keys.forEach(key => {
if (
key.includes('sumOf') ||
key.includes('countOf') ||
key.includes('avgOf') ||
key.includes('minOf') ||
key.includes('maxOf')
) {

Check failure on line 1940 in lib/dao.js

View workflow job for this annotation

GitHub Actions / Code Lint

Expected indentation of 12 spaces but found 14
obj.__data[key] = data[key];
}
});
callback(null, obj);
}

Expand Down

0 comments on commit 53a31da

Please sign in to comment.