diff options
Diffstat (limited to 'search/word.go')
-rw-r--r-- | search/word.go | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/search/word.go b/search/word.go deleted file mode 100644 index c83c318..0000000 --- a/search/word.go +++ /dev/null @@ -1,21 +0,0 @@ -package search - -import "tildegit.org/andinus/grus/storage" - -// Word will search for unjumbled words in database, given sorted word. -func Word(sorted string, db *storage.DB) (word string, err error) { - db.Mu.RLock() - defer db.Mu.RUnlock() - - stmt, err := db.Conn.Prepare("SELECT word FROM words WHERE sorted = ?") - if err != nil { - return - } - defer stmt.Close() - - err = stmt.QueryRow(sorted).Scan(&word) - if err != nil { - return - } - return -} |