ormlambda 3.35.0__py3-none-any.whl → 3.35.1__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.
ormlambda/sql/sqltypes.py CHANGED
@@ -449,14 +449,14 @@ class Point(TypeEngine[_python_Point]):
449
449
  return _python_Point
450
450
 
451
451
 
452
- class JSON(TypeEngine[Any]):
452
+ class JSON[T](TypeEngine[dict | list | T]):
453
453
  """JSON data type."""
454
454
 
455
455
  __visit_name__ = "JSON"
456
456
 
457
457
  @property
458
- def python_type(self) -> Type[dict]:
459
- return dict
458
+ def python_type(self) -> T | Type[dict | list]:
459
+ return dict | list
460
460
 
461
461
 
462
462
  type UuidType = str | _python_UUID
@@ -95,7 +95,12 @@ class Table(metaclass=TableMeta):
95
95
  def to_dict(self) -> dict[str, str | int]:
96
96
  dicc: dict[str, Any] = {}
97
97
  for x in self.__annotations__:
98
- dicc[x] = getattr(self, x)
98
+ value = getattr(self, x)
99
+ if isinstance(value, dict):
100
+ value = tuple(sorted(value.items()))
101
+ if isinstance(value, list | set):
102
+ value = tuple(value)
103
+ dicc[x] = value
99
104
  return dicc
100
105
 
101
106
  @classmethod
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ormlambda
3
- Version: 3.35.0
3
+ Version: 3.35.1
4
4
  Summary: ORM designed to interact with the database (currently with MySQL) using lambda functions and nested functions
5
5
  Author: p-hzamora
6
6
  Author-email: p.hzamora@icloud.com
@@ -128,10 +128,10 @@ ormlambda/sql/functions/max.py,sha256=wXNhFmOlMyD1sKcaBO9asQeXcfY0OvMQPkrlARVXgd
128
128
  ormlambda/sql/functions/min.py,sha256=MTRGXgwzbLgKk9PJpn6JGK1TU91hZe_VsTszngLOh7Q,1570
129
129
  ormlambda/sql/functions/sum.py,sha256=_TN8SitDDBVD6VlsHZH3RpmiE5hkFrGGgC3tuEctKjk,1614
130
130
  ormlambda/sql/interfaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
131
- ormlambda/sql/sqltypes.py,sha256=cqP33UzFx-cAXYosvBIht06O6LqR6miAnAFaDDxXtHY,14409
131
+ ormlambda/sql/sqltypes.py,sha256=mvFn_YM0RTpQWj_ggE4SfbD_LxQhjJX4Kz2M3XUsuBk,14442
132
132
  ormlambda/sql/table/__init__.py,sha256=LLZcMLjwFxgBCPhdm5UQYYZDIbtYWCKPO9CbcXsy5zI,50
133
133
  ormlambda/sql/table/fields.py,sha256=ovNR3bJ473aKW-2NhbKr0iJlVpgW06jurHLob2IyZU8,2116
134
- ormlambda/sql/table/table.py,sha256=l_oXhTHid09IaG-eapBxZTdaNrWCVgGHWLDHnIrrEqY,6484
134
+ ormlambda/sql/table/table.py,sha256=Po6mWk6-ES8URSO6sdoFnnCIACrdce03y0LCcvgXAGk,6686
135
135
  ormlambda/sql/table/table_constructor.py,sha256=c3Z-1El0onSClYBmAatoUBYUOT70tITVqtsDJMxZ9QU,1092
136
136
  ormlambda/sql/type_api.py,sha256=vepqMw6hR4zVhhNIYbtX491iVsxAfwHiSiD3uYQUGTE,1067
137
137
  ormlambda/sql/types.py,sha256=lQxC5gbhDPRckGSRJZ4rYSZr-XUvIMMH8WfkN1wtM1g,844
@@ -152,8 +152,8 @@ ormlambda/util/module_tree/dfs_traversal.py,sha256=lSF03G63XtJFLp03ueAmsHMBvhUkj
152
152
  ormlambda/util/module_tree/dynamic_module.py,sha256=vJOqvm5-WKksudXBK1IcTn4WsuLxt1qXNISq-_21sy4,8705
153
153
  ormlambda/util/plugin_loader.py,sha256=p6WLn-MF1bQd2i2GHy98WQjNKmbQdqIUyTFIcBIHC5M,1034
154
154
  ormlambda/util/typing.py,sha256=Z7irz53ui0hoFnJTe06NX4JPl60_thgdjJIxh5gjGGk,169
155
- ormlambda-3.35.0.dist-info/AUTHORS,sha256=uWpOHaCPTOLbVkk5x9McoLwbgzSeCg7yILeDRyMGWGM,606
156
- ormlambda-3.35.0.dist-info/LICENSE,sha256=xBprFw8GJLdHMOoUqDk0427EvjIcbEREvXXVFULuuXU,1080
157
- ormlambda-3.35.0.dist-info/METADATA,sha256=Z4kT8T0DtDB11oDxUuL8Zc3jR21861m8Y0BfwdGsvyk,13326
158
- ormlambda-3.35.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
159
- ormlambda-3.35.0.dist-info/RECORD,,
155
+ ormlambda-3.35.1.dist-info/AUTHORS,sha256=uWpOHaCPTOLbVkk5x9McoLwbgzSeCg7yILeDRyMGWGM,606
156
+ ormlambda-3.35.1.dist-info/LICENSE,sha256=xBprFw8GJLdHMOoUqDk0427EvjIcbEREvXXVFULuuXU,1080
157
+ ormlambda-3.35.1.dist-info/METADATA,sha256=gKPn-L5OzZCu7iBTRK6I7A0cR50prBpLQwXaJA27MuA,13326
158
+ ormlambda-3.35.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
159
+ ormlambda-3.35.1.dist-info/RECORD,,