aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-04-19 19:33:10 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-04-19 19:33:10 +0200
commitea26916be0ea693b6aefc46f3eeb62e44b8d7cb0 (patch)
tree771f5cdf69122f9a32d2bb9602646100c5a7b0a5 /db
parent786ff5cff8d6fdca6dd80bd0807619bdea5f0f51 (diff)
downloaddict-ea26916be0ea693b6aefc46f3eeb62e44b8d7cb0.tar.gz
dict-ea26916be0ea693b6aefc46f3eeb62e44b8d7cb0.tar.bz2
dict-ea26916be0ea693b6aefc46f3eeb62e44b8d7cb0.zip
feat: Add barebones tcp server
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 {