mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-08-13 12:54:12 +02:00
parent
e6be6267a4
commit
88b48fa167
3 changed files with 42 additions and 0 deletions
|
|
@ -5270,6 +5270,13 @@ def _decode_default_value(value: str) -> object:
|
|||
# It's a binary string, stored as hex
|
||||
to_decode = value[2:-1]
|
||||
return binascii.unhexlify(to_decode)
|
||||
upper = value.upper()
|
||||
if upper == "TRUE":
|
||||
return True
|
||||
if upper == "FALSE":
|
||||
return False
|
||||
if upper == "NULL":
|
||||
return None
|
||||
# If it is a string containing a floating point number:
|
||||
try:
|
||||
return float(value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue