Clean up and less debug

This commit is contained in:
2024-04-07 17:31:35 -04:00
parent f0401d8fda
commit 7d955ff90f
2 changed files with 9 additions and 5 deletions

View File

@@ -703,6 +703,7 @@ def sql_select(
sql_fulltext_match_against = ''
if fulltext_qry_dict:
log.info('Creating partial SQL string for fulltext search.')
sql_fulltext_match_against, data_qry = sql_fulltext_qry_part(fulltext_qry_dict)
# NOTE: Merge the data_qry result with the data dict
@@ -710,6 +711,7 @@ def sql_select(
sql_and_qry = ''
if and_qry_dict:
log.info('Creating partial SQL string for AND search (equals).')
sql_and_qry, data_qry = sql_and_qry_part(and_qry_dict)
# NOTE: Merge the data_qry result with the data dict
@@ -717,6 +719,7 @@ def sql_select(
sql_and_like = ''
if and_like_dict:
log.info('Creating partial SQL string for AND search (LIKE).')
sql_and_like, data_qry = sql_and_like_part(and_like_dict)
# NOTE: Merge the data_qry result with the data dict
@@ -724,6 +727,7 @@ def sql_select(
sql_and_in_dict_li = ''
if and_in_dict_li:
log.info('Creating partial SQL string for AND search (IN).')
sql_and_in_dict_li, data_qry = sql_and_in_dict_li_part(and_in_dict_li)
# NOTE: Merge the data_qry result with the data dict
@@ -845,7 +849,7 @@ def sql_select(
# log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(sql)
log.debug(data)
# log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
result = run_sql_select(sql=sql, data=data)
# log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
@@ -1725,7 +1729,7 @@ def sql_and_qry_part(
def sql_and_like_part(
and_like_dict_obj: dict, # One or more key value pairs. key = field name; value = search string
) -> bool|dict:
log.setLevel(logging.WARNING)
log.setLevel(logging.INFO)
log.debug(locals())
data = {}