Now handles URL params with a list for IN part of SQL SELECT
This commit is contained in:
@@ -237,8 +237,15 @@ async def get_obj_li(
|
||||
|
||||
import urllib
|
||||
|
||||
# This should be a dict list of fields with a list of values to search for using FULLTEXT.
|
||||
fulltext_qry_dict_obj = None
|
||||
|
||||
# This should be a dict list of fields with a list of values to search for using AND.
|
||||
and_qry_dict_obj = None
|
||||
|
||||
# This should be a dict list of fields with a list of values to search for using AND IN.
|
||||
and_in_dict_li_obj = None
|
||||
|
||||
jp_obj = None
|
||||
if jp:
|
||||
log.debug( urllib.parse.unquote(jp) )
|
||||
@@ -256,6 +263,9 @@ async def get_obj_li(
|
||||
if jp_obj.get('and_qry'): # NOTE: This is for the additional AND clauses in the WHERE statement
|
||||
and_qry_dict_obj = jp_obj['and_qry']
|
||||
|
||||
if jp_obj.get('and_in_li'): # NOTE: This is for the additional AND IN clauses in the WHERE statement
|
||||
and_in_dict_li_obj = jp_obj['and_in_li']
|
||||
|
||||
|
||||
if order_by_li:
|
||||
order_by_li = json.loads(order_by_li)
|
||||
@@ -340,6 +350,7 @@ async def get_obj_li(
|
||||
hidden = hidden,
|
||||
fulltext_qry_dict = fulltext_qry_dict_obj,
|
||||
and_qry_dict = and_qry_dict_obj,
|
||||
and_in_dict_li = and_in_dict_li_obj,
|
||||
# fulltext_qry_field_li = fulltext_qry_field_li,
|
||||
# fulltext_qry_str = fulltext_qry_str,
|
||||
order_by_li = order_by_li,
|
||||
@@ -357,6 +368,7 @@ async def get_obj_li(
|
||||
hidden = hidden,
|
||||
fulltext_qry_dict = fulltext_qry_dict_obj,
|
||||
and_qry_dict = and_qry_dict_obj,
|
||||
and_in_dict_li = and_in_dict_li_obj,
|
||||
# fulltext_qry_field_li = fulltext_qry_field_li,
|
||||
# fulltext_qry_str = fulltext_qry_str,
|
||||
order_by_li = order_by_li,
|
||||
|
||||
Reference in New Issue
Block a user