You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of the reason is the last line in apswutils.db._decode_default_value:
def_decode_default_value(value):
ifvalue.startswith("'") andvalue.endswith("'"):
# It's a stringreturnvalue[1:-1]
ifvalue.isdigit():
# It's an integerreturnint(value)
ifvalue.startswith("X'") andvalue.endswith("'"):
# It's a binary string, stored as hexto_decode=value[2:-1]
returnbinascii.unhexlify(to_decode)
# If it is a string containing a floating point number:try:
returnfloat(value)
exceptValueError:
passreturnvalue
The different between strings and SQL functions is that strings are quoted, but after this function executes we no longer pass forward any information on whether the original value was a string or a function.
ozpau
linked a pull request
Mar 9, 2025
that will
close
this issue
See this notebook for the demonstration of the issue: https://github.com/ozpau/fastlite_dataclass_default_functional/blob/main/nbs/00_core.ipynb
Or this quarto rendered page if you prefer: https://ozpau.github.io/fastlite_dataclass_default_functional/core.html
The text was updated successfully, but these errors were encountered: