File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
uncoder-core/app/translator Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
from contextvars import ContextVar
2
2
3
3
return_only_first_query_ctx_var : ContextVar [bool ] = ContextVar ("return_only_first_query_ctx_var" , default = False )
4
- """Set to True to return ony first query if rendered multiple options"""
4
+ """Set to True to return ony first query if rendered multiple options"""
Original file line number Diff line number Diff line change 21
21
from typing import Optional , Union
22
22
23
23
from app .translator .const import DEFAULT_VALUE_TYPE
24
+ from app .translator .core .context_vars import return_only_first_query_ctx_var
24
25
from app .translator .core .custom_types .tokens import LogicalOperatorType , OperatorType
25
26
from app .translator .core .custom_types .values import ValueType
26
27
from app .translator .core .escape_manager import EscapeManager
35
36
from app .translator .core .models .query_container import MetaInfoContainer , RawQueryContainer , TokenizedQueryContainer
36
37
from app .translator .core .str_value_manager import StrValue , StrValueManager
37
38
from app .translator .core .tokenizer import TOKEN_TYPE
38
- from app .translator .core .context_vars import return_only_first_query_ctx_var
39
39
40
40
41
41
class BaseQueryFieldValue (ABC ):
Original file line number Diff line number Diff line change 1
1
UTF8_PAYLOAD_PATTERN = r"UTF8\(payload\)"
2
2
NUM_VALUE_PATTERN = r"(?P<num_value>\d+(?:\.\d+)*)"
3
- SINGLE_QUOTES_VALUE_PATTERN = r"""'(?P<s_q_value>(?:[:a-zA-Z\*0-9=+%#\-\/\\|,;_<>`~".$&^@!?\(\)\{\}\[\]\s]|'')*)'"""
3
+ SINGLE_QUOTES_VALUE_PATTERN = (
4
+ r"""'(?P<s_q_value>(?:[:a-zA-Zа-яА-Я\*0-9=+%#\-\/\\|,;_<>`~".$&^@!?\(\)\{\}\[\]\s]|'')*)'"""
5
+ )
4
6
TABLE_PATTERN = r"\s+FROM\s+[a-zA-Z.\-*]+"
5
7
TABLE_GROUP_PATTERN = r"\s+FROM\s+(?P<table>[a-zA-Z.\-*]+)"
You can’t perform that action at this time.
0 commit comments