aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-03-02 22:47:16 +0000
committerzsloan2021-03-02 22:47:16 +0000
commitbd421438f1f0b4de913fa40cd49cfcda27e6b16f (patch)
tree938a7f46fc8108ffa82838df943aabaec0936a8e
parent818897630e0bd2e97de9bbc3fca805eed64fd44f (diff)
downloadgenenetwork2-bd421438f1f0b4de913fa40cd49cfcda27e6b16f.tar.gz
Changed formatting RifSearch clauses and also changes from clause to an INNER JOIN
-rw-r--r--wqflask/wqflask/do_search.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py
index 4448e81e..f3ef68b2 100644
--- a/wqflask/wqflask/do_search.py
+++ b/wqflask/wqflask/do_search.py
@@ -403,12 +403,10 @@ class RifSearch(MrnaAssaySearch):
DoSearch.search_types['ProbeSet_RIF'] = "RifSearch"
def get_from_clause(self):
- return ", GeneRIF_BASIC "
+ return f" INNER JOIN GeneRIF_BASIC ON GeneRIF_BASIC.`symbol` = { self.dataset.type }.`symbol` "
def get_where_clause(self):
- where_clause = """( %s.symbol = GeneRIF_BASIC.symbol and
- MATCH (GeneRIF_BASIC.comment)
- AGAINST ('+%s' IN BOOLEAN MODE)) """ % (self.dataset.type, self.search_term[0])
+ where_clause = f"(MATCH (GeneRIF_BASIC.comment) AGAINST ('+{ self.search_term[0] }' IN BOOLEAN MODE)) "
return where_clause