aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/db.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/db/db.go b/db/db.go
index b28dea2..61f3bb5 100644
--- a/db/db.go
+++ b/db/db.go
@@ -56,7 +56,8 @@ func (d *DB) SelectDict(ctx context.Context, query string, limit int) ([]*Word,
word, line
FROM words
WHERE word MATCH ?
- ORDER BY rank;`,
+ ORDER BY rank
+ LIMIT ?;`,
query, limit,
)
if err != nil {