esuls 0.1.4__py3-none-any.whl → 0.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- esuls/db_cli.py +16 -0
- {esuls-0.1.4.dist-info → esuls-0.1.6.dist-info}/METADATA +1 -1
- esuls-0.1.6.dist-info/RECORD +10 -0
- esuls-0.1.4.dist-info/RECORD +0 -10
- {esuls-0.1.4.dist-info → esuls-0.1.6.dist-info}/WHEEL +0 -0
- {esuls-0.1.4.dist-info → esuls-0.1.6.dist-info}/licenses/LICENSE +0 -0
- {esuls-0.1.4.dist-info → esuls-0.1.6.dist-info}/top_level.txt +0 -0
esuls/db_cli.py
CHANGED
|
@@ -98,6 +98,8 @@ class AsyncDB(Generic[SchemaType]):
|
|
|
98
98
|
sql_type = "INTEGER"
|
|
99
99
|
elif field_type in (float,):
|
|
100
100
|
sql_type = "REAL"
|
|
101
|
+
elif field_type == bytes:
|
|
102
|
+
sql_type = "BLOB"
|
|
101
103
|
elif field_type in (str, enum.EnumType):
|
|
102
104
|
sql_type = "TEXT"
|
|
103
105
|
elif field_type in (datetime,):
|
|
@@ -176,6 +178,8 @@ class AsyncDB(Generic[SchemaType]):
|
|
|
176
178
|
"""Fast value serialization with type-based optimization."""
|
|
177
179
|
if value is None or isinstance(value, (int, float, bool, str)):
|
|
178
180
|
return value
|
|
181
|
+
if isinstance(value, bytes):
|
|
182
|
+
return value
|
|
179
183
|
if isinstance(value, datetime):
|
|
180
184
|
return value.isoformat()
|
|
181
185
|
if isinstance(value, enum.Enum):
|
|
@@ -191,6 +195,18 @@ class AsyncDB(Generic[SchemaType]):
|
|
|
191
195
|
|
|
192
196
|
field_type = self._type_hints.get(field_name)
|
|
193
197
|
|
|
198
|
+
# Handle bytes fields - keep as bytes
|
|
199
|
+
if field_type == bytes:
|
|
200
|
+
if isinstance(value, bytes):
|
|
201
|
+
return value
|
|
202
|
+
# If somehow stored as string, convert back
|
|
203
|
+
if isinstance(value, str):
|
|
204
|
+
import ast
|
|
205
|
+
try:
|
|
206
|
+
return ast.literal_eval(value)
|
|
207
|
+
except:
|
|
208
|
+
return value.encode('utf-8')
|
|
209
|
+
|
|
194
210
|
# Handle string fields - ensure phone numbers are strings
|
|
195
211
|
if field_type is str or (hasattr(field_type, '__origin__') and field_type.__origin__ is Union and str in getattr(field_type, '__args__', ())):
|
|
196
212
|
return str(value)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
esuls/__init__.py,sha256=dtZtmjZZ8jNspOd17BWsE9D9ofeg3vZF0vIpSgKaZqk,529
|
|
2
|
+
esuls/db_cli.py,sha256=F1XwkuzCc69ldnDv0-X4kl4VZ9zI6oJnqmQAOe2d8jE,17931
|
|
3
|
+
esuls/download_icon.py,sha256=w-bWbyPSbWvonzq43aDDtdxIvdKSa7OSyZ7LaN0uudg,3623
|
|
4
|
+
esuls/request_cli.py,sha256=8wt2MQ4Y3J-vEVacizbbuHLSrENm41UhnnGGzi-DfDE,14277
|
|
5
|
+
esuls/utils.py,sha256=R0peIanodvDrKYFWWdLZ9weIPAUZX787XIjZH40qNo0,677
|
|
6
|
+
esuls-0.1.6.dist-info/licenses/LICENSE,sha256=AY0N01ARt0kbKB7CkByYLqqNQU-yalb-rpv-eXITEWA,1066
|
|
7
|
+
esuls-0.1.6.dist-info/METADATA,sha256=bEWkE_FStozvJNDo_IgUJaQ3GZ6mvK2UNG61HFgrfEY,6994
|
|
8
|
+
esuls-0.1.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
esuls-0.1.6.dist-info/top_level.txt,sha256=WWBDHRhQ0DQLBZKD7Un8uFN93GvVQnP4WvJKkvbACVA,6
|
|
10
|
+
esuls-0.1.6.dist-info/RECORD,,
|
esuls-0.1.4.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
esuls/__init__.py,sha256=dtZtmjZZ8jNspOd17BWsE9D9ofeg3vZF0vIpSgKaZqk,529
|
|
2
|
-
esuls/db_cli.py,sha256=9mxN4sl6QYNZwWDLqeaaMM4dSlWwHXZhfk5jLtQfq04,17380
|
|
3
|
-
esuls/download_icon.py,sha256=w-bWbyPSbWvonzq43aDDtdxIvdKSa7OSyZ7LaN0uudg,3623
|
|
4
|
-
esuls/request_cli.py,sha256=8wt2MQ4Y3J-vEVacizbbuHLSrENm41UhnnGGzi-DfDE,14277
|
|
5
|
-
esuls/utils.py,sha256=R0peIanodvDrKYFWWdLZ9weIPAUZX787XIjZH40qNo0,677
|
|
6
|
-
esuls-0.1.4.dist-info/licenses/LICENSE,sha256=AY0N01ARt0kbKB7CkByYLqqNQU-yalb-rpv-eXITEWA,1066
|
|
7
|
-
esuls-0.1.4.dist-info/METADATA,sha256=g6V1IyUqS6jvYYkygjIFK8iVOi3ItmkeLQ1T8oqUvyk,6994
|
|
8
|
-
esuls-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
-
esuls-0.1.4.dist-info/top_level.txt,sha256=WWBDHRhQ0DQLBZKD7Un8uFN93GvVQnP4WvJKkvbACVA,6
|
|
10
|
-
esuls-0.1.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|