Skip to content

Commit 76fc55c

Browse files
committed
fix: switch to pydantic
1 parent 15261f5 commit 76fc55c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/query_farm_server_base/duckdb_serialized_values.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def sql(self) -> str:
110110
if padding_bits:
111111
bits = bits[padding_bits:]
112112

113-
return bits
113+
return f"'{bits}'"
114114

115115

116116
class SerializedValueType_blob(BaseModel):
@@ -128,8 +128,9 @@ class SerializedValue_blob(SerializedValueBase):
128128
def sql(self) -> str:
129129
if self.is_null:
130130
return "null"
131+
assert self.value
131132

132-
return str(self.value)
133+
return f"'{self.value.replace("'", "''")}'"
133134

134135

135136
class SerializedValueType_boolean(BaseModel):

0 commit comments

Comments
 (0)