commit dd2205a5d9df8838ca89a3ecc2d3ebaed19a85d3
parent 5fbfaf281a49c46c302f071436cdf6307ecc2342
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Tue, 27 Dec 2011 16:28:01 +0100
simplify
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/query.py b/query.py
@@ -97,7 +97,7 @@ def do_query(word, phon, minsyll, maxsyll, elide, gender, offset, size):
rest = ''' FROM words AS t1, words AS t2
WHERE (t1.phon_end = t2.phon_end OR t1.word_end = t2.word_end)
- AND (t1.word = ? OR ?) AND (t1.phon = ? OR ?)
+ AND (t1.word = ?) AND (t1.phon = ?)
AND ((? OR t2.max_nsyl >= ?)
AND (? OR t2.min_nsyl <= ?
OR (t2.elidable AND t2.min_nsyl - 1 <= ? AND ?)))
@@ -105,7 +105,7 @@ def do_query(word, phon, minsyll, maxsyll, elide, gender, offset, size):
'''
#limit = '''LIMIT ? OFFSET ?'''
- args = (word, word == None, phon, phon == None,
+ args = (word, phon,
minsyll == None, minsyll, maxsyll == None, maxsyll, maxsyll, elide,)
query = '''
SELECT t1.feminine AS t1_feminine,