ormlambda 1.1.3__py3-none-any.whl → 1.2.0__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/common/interfaces/IRepositoryBase.py +4 -0
- ormlambda/utils/dtypes.py +14 -1
- {ormlambda-1.1.3.dist-info → ormlambda-1.2.0.dist-info}/METADATA +6 -2
- {ormlambda-1.1.3.dist-info → ormlambda-1.2.0.dist-info}/RECORD +6 -6
- {ormlambda-1.1.3.dist-info → ormlambda-1.2.0.dist-info}/LICENSE +0 -0
- {ormlambda-1.1.3.dist-info → ormlambda-1.2.0.dist-info}/WHEEL +0 -0
ormlambda/utils/dtypes.py
CHANGED
@@ -66,8 +66,21 @@ DATE = Literal["DATE", "DATETIME(fsp)", "TIMESTAMP(fsp)", "TIME(fsp)", "YEAR"]
|
|
66
66
|
def transform_py_dtype_into_query_dtype(dtype: Any) -> str:
|
67
67
|
# TODOL: must be found a better way to convert python data type into SQL clauses
|
68
68
|
# float -> DECIMAL(5,2) is an error
|
69
|
-
dicc: dict[Any, str] = {
|
69
|
+
dicc: dict[Any, str] = {
|
70
|
+
int: "INTEGER",
|
71
|
+
float: "FLOAT(5,2)",
|
72
|
+
Decimal: "FLOAT",
|
73
|
+
datetime.datetime: "DATETIME",
|
74
|
+
datetime.date: "DATE",
|
75
|
+
bytes: "BLOB",
|
76
|
+
bytearray: "BLOB",
|
77
|
+
str: "VARCHAR(255)",
|
78
|
+
np.uint64: "BIGINT UNSIGNED",
|
79
|
+
}
|
70
80
|
|
81
|
+
res = dicc.get(dtype, None)
|
82
|
+
if res is None:
|
83
|
+
raise ValueError(f"datatype '{dtype}' is not expected.")
|
71
84
|
return dicc[dtype]
|
72
85
|
|
73
86
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ormlambda
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.2.0
|
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
|
@@ -8,9 +8,13 @@ Requires-Python: >=3.12,<4.0
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
9
9
|
Classifier: Programming Language :: Python :: 3.12
|
10
10
|
Requires-Dist: fluent-validation (>=3.1.0,<4.0.0)
|
11
|
-
Requires-Dist: mysql-connector (>=2.2.9,<3.0.0)
|
11
|
+
Requires-Dist: mysql-connector-python (>=2.2.9,<3.0.0)
|
12
12
|
Description-Content-Type: text/markdown
|
13
13
|
|
14
|
+

|
15
|
+

|
16
|
+

|
17
|
+
|
14
18
|
# ormMySQL
|
15
19
|
This ORM is designed to connect with a MySQL server, facilitating the management of various database queries. Built with flexibility and efficiency in mind, this ORM empowers developers to interact with the database using lambda functions, allowing for concise and expressive query construction.
|
16
20
|
|
@@ -9,7 +9,7 @@ ormlambda/common/enums/condition_types.py,sha256=mDPMrtzZu4IYv3-q5Zw4NNgwUoNAx4l
|
|
9
9
|
ormlambda/common/enums/join_type.py,sha256=7LEhE34bzYOwJxe8yxPJo_EjQpGylgClAPX1Wt3z4n4,292
|
10
10
|
ormlambda/common/interfaces/INonQueryCommand.py,sha256=7CjLW4sKqkR5zUIGvhRXOtzTs6vypJW1a9EJHlgCw2c,260
|
11
11
|
ormlambda/common/interfaces/IQueryCommand.py,sha256=hfzCosK4-n8RJIb2PYs8b0qU3TNmfYluZXBf47KxxKs,331
|
12
|
-
ormlambda/common/interfaces/IRepositoryBase.py,sha256=
|
12
|
+
ormlambda/common/interfaces/IRepositoryBase.py,sha256=ABdecwq4G_Gg4wvjpj7LWDntdjRmcMMLWOuG2pfAqfg,1939
|
13
13
|
ormlambda/common/interfaces/IStatements.py,sha256=h0qgSiWz5rxd9K2FMJPUJau8IKO-ycvQxOSyd74oMq8,9315
|
14
14
|
ormlambda/common/interfaces/__init__.py,sha256=4tthR8pNIHGvgu0n7i3ZEQYP_R3wmqh40l34cAZbM2o,244
|
15
15
|
ormlambda/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -52,7 +52,7 @@ ormlambda/databases/my_sql/statements.py,sha256=1umK_89JWIfViz1cHfTwqIOvMkYZT2Ii
|
|
52
52
|
ormlambda/model_base.py,sha256=jH3MTAsVF3V2jXvtKCtpAC-Q102UfBPZ0YiM0nqp-6M,1053
|
53
53
|
ormlambda/utils/__init__.py,sha256=ywMdWqmA2jHj19-W-S04yfaYF5hv4IZ1lZDq0B8Jnjs,142
|
54
54
|
ormlambda/utils/column.py,sha256=5FAGzCU4yvNS4MhwJJ5i73h7RvHD5UCVox0NdzMsMiE,1945
|
55
|
-
ormlambda/utils/dtypes.py,sha256=
|
55
|
+
ormlambda/utils/dtypes.py,sha256=1kRsT5JggNS1DMWgSUdBb67CefQHnZ-VTN1WI7nN2yQ,7879
|
56
56
|
ormlambda/utils/foreign_key.py,sha256=ewGLPtf1MrFogvwGm_jsSnOLAH2G9virXvLcc3co36I,2973
|
57
57
|
ormlambda/utils/lambda_disassembler/__init__.py,sha256=q23_F2Vp1_XgVpQSbWQPM5wxzRCZOr7ZMb9X5VG_YxU,229
|
58
58
|
ormlambda/utils/lambda_disassembler/dis_types.py,sha256=Myuo9-KSBIJSyr9jfLSDDe1jbrzyOqZNLufv6ODHm98,4824
|
@@ -65,7 +65,7 @@ ormlambda/utils/module_tree/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
65
65
|
ormlambda/utils/module_tree/dfs_traversal.py,sha256=lSF03G63XtJFLp03ueAmsHMBvhUkjptDbK3IugXm8iU,1425
|
66
66
|
ormlambda/utils/module_tree/dynamic_module.py,sha256=zwvjU3U2cz6H2CDp9Gncs5D5bSAyfITNa2SDqFDl8rw,8551
|
67
67
|
ormlambda/utils/table_constructor.py,sha256=I2oFTfa6BPTILY6UDYGZy4fJxZazZMkH89NObkfRemo,11480
|
68
|
-
ormlambda-1.
|
69
|
-
ormlambda-1.
|
70
|
-
ormlambda-1.
|
71
|
-
ormlambda-1.
|
68
|
+
ormlambda-1.2.0.dist-info/LICENSE,sha256=xBprFw8GJLdHMOoUqDk0427EvjIcbEREvXXVFULuuXU,1080
|
69
|
+
ormlambda-1.2.0.dist-info/METADATA,sha256=5uv_JdYZ2gWIL-P4HohMxMvw96jLizPd2aZi77MWGyQ,8427
|
70
|
+
ormlambda-1.2.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
71
|
+
ormlambda-1.2.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|