|
31 | 31 | from ..exceptions import RemoteServiceError, NoResultsWarning, LoginError
|
32 | 32 | from ..query import QueryWithLogin
|
33 | 33 | from ..utils import schema
|
34 |
| -from .utils import py2adql, _split_str_as_list_of_str, sanitize_val, to_cache, eso_hash |
| 34 | +from .utils import py2adql, _split_str_as_list_of_str, adql_sanitize_val, to_cache, eso_hash |
35 | 35 | import pyvo
|
36 | 36 |
|
37 | 37 | __doctest_skip__ = ['EsoClass.*']
|
@@ -112,18 +112,22 @@ def timeout(self):
|
112 | 112 | # [W1203 - logging-fstring-interpolation]
|
113 | 113 | @staticmethod
|
114 | 114 | def log_info(message):
|
| 115 | + "Wrapper for logging function" |
115 | 116 | log.info("%s", message)
|
116 | 117 |
|
117 | 118 | @staticmethod
|
118 | 119 | def log_warning(message):
|
| 120 | + "Wrapper for logging function" |
119 | 121 | log.warning("%s", message)
|
120 | 122 |
|
121 | 123 | @staticmethod
|
122 | 124 | def log_error(message):
|
| 125 | + "Wrapper for logging function" |
123 | 126 | log.error("%s", message)
|
124 | 127 |
|
125 | 128 | @staticmethod
|
126 | 129 | def log_debug(message):
|
| 130 | + "Wrapper for logging function" |
127 | 131 | log.debug("%s", message)
|
128 | 132 |
|
129 | 133 | @timeout.setter
|
@@ -393,7 +397,7 @@ def _query_instrument_or_collection(self,
|
393 | 397 |
|
394 | 398 | # TODO
|
395 | 399 | # Check whether v is string or number, put in single quotes if string
|
396 |
| - where_constraints_strlist = [f"{k} = {sanitize_val(v)}" for k, v in filters.items()] + coord_constraint |
| 400 | + where_constraints_strlist = [f"{k} = {adql_sanitize_val(v)}" for k, v in filters.items()] + coord_constraint |
397 | 401 | where_constraints = [where_collections_str] + where_constraints_strlist
|
398 | 402 | query = py2adql(table=query_on.table_name, columns=columns, where_constraints=where_constraints,
|
399 | 403 | top=self.ROW_LIMIT)
|
@@ -465,7 +469,7 @@ def query_main(self, *, column_filters=None, columns=None,
|
465 | 469 | columns = columns or []
|
466 | 470 | filters = {**dict(kwargs), **column_filters}
|
467 | 471 |
|
468 |
| - where_constraints_strlist = [f"{k} = {sanitize_val(v)}" for k, v in filters.items()] |
| 472 | + where_constraints_strlist = [f"{k} = {adql_sanitize_val(v)}" for k, v in filters.items()] |
469 | 473 | where_constraints = where_constraints_strlist
|
470 | 474 |
|
471 | 475 | if print_help:
|
|
0 commit comments