Open euri10 opened 2 years ago
Slightly related I cannot cast variable to character varying
because of the space
from buildpg import funcs
funcs.cast("value", "character varying")
---------------------------------------------------------------------------
UnsafeError Traceback (most recent call last)
Input In [4], in <cell line: 1>()
----> 1 funcs.cast("value", "character varying")
...
buildpg/components.py:25, in check_word(s)
23 raise TypeError('value is not a string')
24 if NOT_WORD.search(s):
---> 25 raise UnsafeError(f'str contain unsafe (non word) characters: "{s}"')
UnsafeError: str contain unsafe (non word) characters: "character varying"
related to #31 (and #27 to some extent) I know I can use RawDangerous, just wanted to mention it
this works:
but casting to arrays fails because of the brackets:
it feels like there are some funcs that could (should ?) allow unsafe characters, space in aliases, brackets in cast ?
I just dicovered that, having to write the below snippet. It's part of a
HAVING
clause logic I intended to push, but I think I would be shooting myself i the foot here, sincecountries
is client-controlled...