Skip to content

gis-8131 fix equal integer values render #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
}



class CortexXQLFieldValueRender(BaseFieldValueRender):
details: PlatformDetails = cortex_xql_query_details
str_value_manager = cortex_xql_str_value_manager
Expand All @@ -72,7 +71,8 @@ def _wrap_str_value(value: str) -> str:
def equal_modifier(self, field: str, value: DEFAULT_VALUE_TYPE) -> str:
if isinstance(value, list):
values = ", ".join(
f"{self._pre_process_value(field, v, value_type=ValueType.value, wrap_str=True)}" for v in value
f"{self._pre_process_value(field, str(v) if isinstance(v, int) else v, ValueType.value, True)}"
for v in value
)
return f"{field} in ({values})"

Expand Down Expand Up @@ -123,7 +123,11 @@ def startswith_modifier(self, field: str, value: DEFAULT_VALUE_TYPE) -> str:
def regex_modifier(self, field: str, value: DEFAULT_VALUE_TYPE) -> str:
if isinstance(value, list):
return f"({self.or_token.join(self.regex_modifier(field=field, value=v) for v in value)})"
return f"{field} ~= {self._pre_process_value(field ,value, value_type=ValueType.regex_value, wrap_str=True)}"
value = self._pre_process_value(field, value, value_type=ValueType.regex_value, wrap_str=True)
if value.endswith('\\\\"'):
value = value[:-1] + "]" + value[-1:]
value = value[:-4] + "[" + value[-4:]
return f"{field} ~= {value}"

def not_regex_modifier(self, field: str, value: DEFAULT_VALUE_TYPE) -> str:
if isinstance(value, list):
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy