summary refs log tree commit diff stats
path: root/search/anagrams.go
diff options
context:
space:
mode:
Diffstat (limited to 'search/anagrams.go')
-rw-r--r--search/anagrams.go35
1 files changed, 0 insertions, 35 deletions
diff --git a/search/anagrams.go b/search/anagrams.go
deleted file mode 100644
index e04dfd7..0000000
--- a/search/anagrams.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package search
-
-import "tildegit.org/andinus/grus/storage"
-
-// Anagrams will search for unjumbled words in database, given sorted
-// word along with all the anagrams.
-func Anagrams(sorted string, db *storage.DB) (anagrams []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()
-
-	rows, err := stmt.Query(sorted)
-	if err != nil {
-		return
-	}
-	defer rows.Close()
-	for rows.Next() {
-		var word string
-		err = rows.Scan(&word)
-		if err != nil {
-			return
-		}
-		anagrams = append(anagrams, word)
-	}
-	err = rows.Err()
-	if err != nil {
-		return
-	}
-	return
-}
two blank lines where is expected' href='/akspecs/ranger/commit/examples/plugin_chmod_keybindings.py?id=ab41c7766ced3f1b8f6b4ed317f0db4e0d71b897'>ab41c776 ^
ca1a5d21 ^
b3d031a9 ^
972da7ba ^
d1a1173d ^

33aeef8e ^
d1a1173d ^


972da7ba ^
b3d031a9 ^
ca1a5d21 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26