Skip to content

Commit

Permalink
Merge pull request #18 from abetomo/add_limit_when_selecting
Browse files Browse the repository at this point in the history
Add `limit` when selecting
  • Loading branch information
abetomo authored Feb 21, 2018
2 parents 096cad1 + ed6361c commit 1e059d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ class Db {
const result = this.db.commandSync('select', {
table: this.config.name,
match_columns: columns.join(','),
query: query
query: query,
limit: 100 // TODO: More than 100 cases
})[0]
const count = result.shift()[0]
const keys = result.shift().slice(2).map((k) => k[0])
Expand Down

0 comments on commit 1e059d3

Please sign in to comment.