ormlambda 3.11.1__py3-none-any.whl → 3.12.2__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/__init__.py +1 -1
- ormlambda/caster/caster.py +1 -1
- ormlambda/common/abstract_classes/clause_info_converter.py +73 -0
- ormlambda/common/abstract_classes/decomposition_query.py +12 -68
- ormlambda/common/abstract_classes/non_query_base.py +2 -2
- ormlambda/common/interfaces/ICustomAlias.py +1 -1
- ormlambda/components/delete/abstract_delete.py +2 -2
- ormlambda/components/join/__init__.py +1 -0
- ormlambda/databases/my_sql/clauses/delete.py +0 -1
- ormlambda/databases/my_sql/clauses/drop_table.py +8 -5
- ormlambda/databases/my_sql/clauses/group_by.py +1 -2
- ormlambda/databases/my_sql/clauses/select.py +2 -0
- ormlambda/databases/my_sql/clauses/upsert.py +8 -4
- ormlambda/databases/my_sql/query_builder.py +158 -0
- ormlambda/databases/my_sql/statements.py +19 -156
- ormlambda/engine/__init__.py +1 -1
- ormlambda/engine/url.py +4 -1
- ormlambda/sql/clause_info/__init__.py +2 -1
- ormlambda/sql/clause_info/aggregate_function_base.py +86 -0
- ormlambda/sql/clause_info/clause_info.py +1 -98
- ormlambda/sql/clause_info/interface/IClauseInfo.py +37 -0
- ormlambda/sql/clause_info/interface/__init__.py +1 -0
- ormlambda/sql/column.py +3 -0
- ormlambda/statements/base_statement.py +6 -2
- ormlambda/statements/interfaces/IStatements.py +25 -19
- ormlambda/utils/module_tree/dynamic_module.py +3 -2
- {ormlambda-3.11.1.dist-info → ormlambda-3.12.2.dist-info}/METADATA +66 -16
- {ormlambda-3.11.1.dist-info → ormlambda-3.12.2.dist-info}/RECORD +31 -28
- {ormlambda-3.11.1.dist-info → ormlambda-3.12.2.dist-info}/WHEEL +1 -1
- ormlambda/databases/my_sql/caster/read.py +0 -39
- ormlambda/databases/my_sql/caster/write.py +0 -37
- /ormlambda/{databases/my_sql → components/join}/join_context.py +0 -0
- {ormlambda-3.11.1.dist-info → ormlambda-3.12.2.dist-info}/LICENSE +0 -0
@@ -2,7 +2,8 @@ from __future__ import annotations
|
|
2
2
|
import sys
|
3
3
|
from pathlib import Path
|
4
4
|
from typing import Optional, Type, TYPE_CHECKING
|
5
|
-
|
5
|
+
|
6
|
+
# from collections import defaultdict
|
6
7
|
import importlib.util
|
7
8
|
import inspect
|
8
9
|
import re
|
@@ -12,7 +13,7 @@ if TYPE_CHECKING:
|
|
12
13
|
|
13
14
|
|
14
15
|
# from ormlambda import ForeignKey
|
15
|
-
from .dfs_traversal import DFSTraversal
|
16
|
+
# from .dfs_traversal import DFSTraversal
|
16
17
|
|
17
18
|
|
18
19
|
class Node:
|
@@ -1,12 +1,13 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: ormlambda
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.12.2
|
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
|
7
7
|
Requires-Python: >=3.12,<4.0
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
9
9
|
Classifier: Programming Language :: Python :: 3.12
|
10
|
+
Classifier: Programming Language :: Python :: 3.13
|
10
11
|
Requires-Dist: mysql-connector-python (>=9.0.0,<10.0.0)
|
11
12
|
Requires-Dist: shapely (>=2.0.6,<3.0.0)
|
12
13
|
Description-Content-Type: text/markdown
|
@@ -69,10 +70,12 @@ Once the `AddressModel` class is created, we will not only be able to access all
|
|
69
70
|
|
70
71
|
```python
|
71
72
|
from models.address import Address
|
73
|
+
from ormlambda import create_engine, ORM
|
72
74
|
|
73
|
-
db =
|
75
|
+
db = create_engine('mysql://root:1234@localhost:3306/sakila')
|
74
76
|
|
75
|
-
|
77
|
+
|
78
|
+
AddressModel = ORM(Address, db)
|
76
79
|
|
77
80
|
result = AddressModel.where(Address.City.Country.country.regex(r"^[aA]")).select(
|
78
81
|
lambda address: (
|
@@ -313,7 +316,7 @@ res = AddressModel.count(Address.address_id, execute=True)
|
|
313
316
|
|
314
317
|
The `concat` method allows you to concatenate multiple columns or values into a single string. This is particularly useful for creating derived fields in your queries.
|
315
318
|
|
316
|
-
|
319
|
+
### Usage
|
317
320
|
|
318
321
|
```python
|
319
322
|
response = ORM(Address, db).where(Address.City.Country.country.regex(r"^Spain")).first(
|
@@ -344,6 +347,60 @@ As you can see in the response, the result is a dictionary where the keys are a
|
|
344
347
|
|
345
348
|
Another elegant approach to adjust the response and obtain an object is by using the `flavour` attribute. You can pass a callable object, which will be used to instantiate it with the returned data.
|
346
349
|
|
350
|
+
|
351
|
+
## 2. Group by
|
352
|
+
|
353
|
+
The `groupby` method is used to filter results based on aggregate functions.
|
354
|
+
|
355
|
+
### Usage
|
356
|
+
```python
|
357
|
+
from ormlambda import Column, ORM, create_engine
|
358
|
+
from test.config import DATABASE_URL
|
359
|
+
|
360
|
+
|
361
|
+
class Response(BaseModel):
|
362
|
+
district: str
|
363
|
+
count: int
|
364
|
+
|
365
|
+
engine= create_engine(DATABASE_URL)
|
366
|
+
model = ORM(Address,engine)
|
367
|
+
|
368
|
+
count_name = Column(column_name="count")
|
369
|
+
|
370
|
+
res = (
|
371
|
+
self.model
|
372
|
+
.groupby(Address.district)
|
373
|
+
.select(
|
374
|
+
(
|
375
|
+
Address.district,
|
376
|
+
self.model.count(Address.address),
|
377
|
+
),
|
378
|
+
flavour=Response,
|
379
|
+
)
|
380
|
+
)
|
381
|
+
```
|
382
|
+
|
383
|
+
## 3. Having
|
384
|
+
|
385
|
+
The `having` method is used to filter results based on aggregate functions. It is typically used in conjunction with `group by` clauses.
|
386
|
+
|
387
|
+
### Usage
|
388
|
+
```python
|
389
|
+
res = (
|
390
|
+
model
|
391
|
+
.groupby(Address.district)
|
392
|
+
.having(count_name > 4)
|
393
|
+
.select(
|
394
|
+
(
|
395
|
+
Address.district,
|
396
|
+
model.count(Address.address),
|
397
|
+
),
|
398
|
+
flavour=Response,
|
399
|
+
)
|
400
|
+
)
|
401
|
+
```
|
402
|
+
|
403
|
+
|
347
404
|
## Using BaseModel for Custom Responses (Pydantic)
|
348
405
|
|
349
406
|
You can utilize `BaseModel` from Pydantic to create structured response models. This allows you to define the expected structure of your data, ensuring type safety and validation.
|
@@ -360,10 +417,11 @@ class AddressCombine(BaseModel):
|
|
360
417
|
|
361
418
|
model_config: ConfigDict = {"extra": "forbid"}
|
362
419
|
|
363
|
-
|
364
|
-
|
420
|
+
db = create_engine('mysql://root:1234@localhost:3306/sakila')
|
421
|
+
|
365
422
|
select = (
|
366
|
-
|
423
|
+
ORM(Address, db)
|
424
|
+
.order(lambda x: x.City.Country.country, "DESC")
|
367
425
|
.limit(10)
|
368
426
|
.where(Address.City.Country.country == "Spain")
|
369
427
|
.first(
|
@@ -387,14 +445,6 @@ print(select.city)
|
|
387
445
|
print(select.country)
|
388
446
|
```
|
389
447
|
|
390
|
-
|
391
|
-
<!-- ### 2. Having
|
392
|
-
|
393
|
-
The `having` method is used to filter results based on aggregate functions. It is typically used in conjunction with `group by` clauses.
|
394
|
-
|
395
|
-
#### Usage -->
|
396
|
-
|
397
|
-
|
398
448
|
## Combine aggregation method
|
399
449
|
As shown in the previous examples, setting the `execute` attribute to `True` allows us to perform the corresponding query in a single line. However, if you're looking to improve efficiency, you can combine all of them into one query.
|
400
450
|
```python
|
@@ -1,20 +1,21 @@
|
|
1
|
-
ormlambda/__init__.py,sha256=
|
1
|
+
ormlambda/__init__.py,sha256=tAhxXMEeBVObdo417TvykP3s-LPG2yrFgaswNbylbsQ,683
|
2
2
|
ormlambda/caster/__init__.py,sha256=JWJ6qdPTk_uyJHGfFpvFCZeOXdP6DzL4-MtMFZVDPRY,150
|
3
3
|
ormlambda/caster/base_caster.py,sha256=c3vCGoKDyJ39kfUiS7sNKhKdjBRYSK1Ie88lwDIXqgE,1774
|
4
|
-
ormlambda/caster/caster.py,sha256=
|
4
|
+
ormlambda/caster/caster.py,sha256=EiJFeb1t7wRLTloumuZYJgUt_ZNS8FEBAbLguBFLk30,1878
|
5
5
|
ormlambda/caster/interfaces/ICaster.py,sha256=MCBBVBho9KH67vCcUk8nclY0a7QoqxgdyVJJR0-QDT0,759
|
6
6
|
ormlambda/caster/interfaces/__init__.py,sha256=TRoIxxgxuhUhCJq2ldLS3UEa1THrMXEIyTH5K46vyGw,43
|
7
7
|
ormlambda/common/__init__.py,sha256=g4yGxH4WEgvQ7Rix4lpp3FQ-3SeRhptNd5sabgZLQNk,59
|
8
8
|
ormlambda/common/abstract_classes/__init__.py,sha256=l39_WaBH38wrDV2KXb83c73ct7oxSIIVj2Ep4UcvxrU,186
|
9
|
-
ormlambda/common/abstract_classes/
|
10
|
-
ormlambda/common/abstract_classes/
|
9
|
+
ormlambda/common/abstract_classes/clause_info_converter.py,sha256=_gAloKLmkkx-horxoU752CJIldAIRkLtkJH2q5WSQA4,3162
|
10
|
+
ormlambda/common/abstract_classes/decomposition_query.py,sha256=T5ilaUO9n9JlgeYhCVcp0aUKFzaPXinlYXg9ziwyGFw,5153
|
11
|
+
ormlambda/common/abstract_classes/non_query_base.py,sha256=vdZK5jkS3IYD-0F2NGycyEqc2FDzZ3wMN9xzKTH8NBE,989
|
11
12
|
ormlambda/common/abstract_classes/query_base.py,sha256=6qUFPwsVx45kUW3b66pHiSyjhcH4mzbdkddlGeUnG7c,266
|
12
13
|
ormlambda/common/enums/__init__.py,sha256=4lVKCHi1JalwgNzjsAXqX-C54NJEH83y2v5baMO8fN4,103
|
13
14
|
ormlambda/common/enums/condition_types.py,sha256=QZnhhlTwzLcZ9kkmG6a08fQjUUJsJ5XGAH7QCiJRL1A,330
|
14
15
|
ormlambda/common/enums/join_type.py,sha256=EosZVnvAc72LlZHuICIgoKWwUJzhvWOIIAohcbDYPQo,354
|
15
16
|
ormlambda/common/errors/__init__.py,sha256=nc6SJs6v7MbXwcEgcSW7SSG_iBECfz_10YzWwqU1D-E,888
|
16
17
|
ormlambda/common/global_checker.py,sha256=9FtdGl0SCSLEBBFBtburmP_Sh5h2tx88ZG08vjUordc,894
|
17
|
-
ormlambda/common/interfaces/ICustomAlias.py,sha256=
|
18
|
+
ormlambda/common/interfaces/ICustomAlias.py,sha256=GS-Riw_8yCr7N9DXSf5nZxkrwMH6eomNd-BdEhCA7fY,161
|
18
19
|
ormlambda/common/interfaces/IDecompositionQuery.py,sha256=2fwcXONBnYpxL1YHPHaLxqQJ4NANGuTky69QNa74xd4,853
|
19
20
|
ormlambda/common/interfaces/IJoinSelector.py,sha256=-w-MJmwq65tpDLtigWSLgvAqeOl75DA-EyWIugNkfCs,490
|
20
21
|
ormlambda/common/interfaces/INonQueryCommand.py,sha256=7CjLW4sKqkR5zUIGvhRXOtzTs6vypJW1a9EJHlgCw2c,260
|
@@ -23,10 +24,12 @@ ormlambda/common/interfaces/__init__.py,sha256=np5wuAnBVAHDyD01-X3M9qPmzbjOzP6KN
|
|
23
24
|
ormlambda/components/__init__.py,sha256=DfPVPLGLbQpbfBmXGKYcJRTELxzzdeNbZbuiMgZrPiA,168
|
24
25
|
ormlambda/components/delete/IDelete.py,sha256=06ZEdbKBxsHSwsGMBu0E1om4WJjojZAm-L3b95eQrcc,139
|
25
26
|
ormlambda/components/delete/__init__.py,sha256=X_at2L4QkxDVK1olXhFHqNemkB8Dxbb7BYqv0EJyu7M,102
|
26
|
-
ormlambda/components/delete/abstract_delete.py,sha256=
|
27
|
+
ormlambda/components/delete/abstract_delete.py,sha256=4ZgttbvIGpL9_QTJBHNf7jx_1-UoqT9ggNuhE2Au-eM,533
|
27
28
|
ormlambda/components/insert/IInsert.py,sha256=YIfMPlKu7UGgnVpZuhpr0Mtnefe-O85hqk8-GZrVK7w,139
|
28
29
|
ormlambda/components/insert/__init__.py,sha256=TGShCJZwejK3zZCRistBAKoDy2NNDRR_w1LXIbN66Dk,102
|
29
30
|
ormlambda/components/insert/abstract_insert.py,sha256=OmsfVMx8ifD2_ajRSXX8-EeKRTS7FTwbgSjdwASz_eg,695
|
31
|
+
ormlambda/components/join/__init__.py,sha256=7hwAB-nKaMirTT6uNZ1JtYNkkIx5zMSa6jaqr28d8Cg,67
|
32
|
+
ormlambda/components/join/join_context.py,sha256=SLxVSwCURLOBSMB-aN7PV69sBQXOOP1sCezAKn3Wnqo,3256
|
30
33
|
ormlambda/components/select/ISelect.py,sha256=saA0Iat4lXfd1vc7a7t6Stc_3BJHAysGWH1AcmrhQhw,372
|
31
34
|
ormlambda/components/select/__init__.py,sha256=aIO4Bkk1od7cC9qbwyZ__K1X8hw92OozmfSaKdu3inY,43
|
32
35
|
ormlambda/components/update/IUpdate.py,sha256=U-3Wx8lyCglhxf9gCXWO3MVgydG6gfRpzp00_MHC5cU,168
|
@@ -39,7 +42,6 @@ ormlambda/databases/__init__.py,sha256=-m7uIigkbFNU5JHeOE8DeTA2bRVYEppw2XPASTSvW
|
|
39
42
|
ormlambda/databases/my_sql/__init__.py,sha256=2Ue97WtcpfB6-8SgUIHLOzk_iT44YUzG6baXCHmV9uA,212
|
40
43
|
ormlambda/databases/my_sql/caster/__init__.py,sha256=Df2sdZaAJ1Mi5Ego0sILMk5pF1NbK-nlV0hbpzd0PWE,47
|
41
44
|
ormlambda/databases/my_sql/caster/caster.py,sha256=6byP5RJsWmnLZ2C9Br8OpdpilLedogDlTv3i8HMObu8,1217
|
42
|
-
ormlambda/databases/my_sql/caster/read.py,sha256=PBseYoNJtMgmr4sL5aD6uef0f-mm6LakAz-v-IcBs7w,1096
|
43
45
|
ormlambda/databases/my_sql/caster/types/__init__.py,sha256=lZ9YFqDjY6d6-Vy0tBMZfLI5EhyKXrb12Ys4eYiWjAg,396
|
44
46
|
ormlambda/databases/my_sql/caster/types/bytes.py,sha256=Aq4iO-JmHeCXLqcQfNqsSTUpc1gceqY3TC4H3PJfv3g,899
|
45
47
|
ormlambda/databases/my_sql/caster/types/datetime.py,sha256=Tw27k_svBFpmZGQDzTfi14Cl413VknOZ1t4nDXHk_dk,1062
|
@@ -49,41 +51,40 @@ ormlambda/databases/my_sql/caster/types/iterable.py,sha256=CVgYrQN9hIyAcFK4__e42
|
|
49
51
|
ormlambda/databases/my_sql/caster/types/none.py,sha256=D2eF8sgLEywipKiJtXc_gYx3Edn5rcOUrw-DigTcprU,793
|
50
52
|
ormlambda/databases/my_sql/caster/types/point.py,sha256=g5G691CsyQQtK6BGoKVpDzUtMRJNIKz_98xeHxqTGLE,1426
|
51
53
|
ormlambda/databases/my_sql/caster/types/string.py,sha256=uYIfXHLrXhiShd9KRALBc2ULm7d5Y2swuz9lDX3Zucg,890
|
52
|
-
ormlambda/databases/my_sql/caster/write.py,sha256=mfbtlAFamsnMbe1L4ARSAw2ch5qhz15jh5cSyAljcss,1322
|
53
54
|
ormlambda/databases/my_sql/clauses/ST_AsText.py,sha256=Fx-CgQ01aSkcuSlcdmLIWb7f3kd7r6kWs_BGu1HOVx8,1165
|
54
55
|
ormlambda/databases/my_sql/clauses/ST_Contains.py,sha256=K9cZwQaQQCgZTQdnAokln5lVSyV99CkeRnmOd2RIots,968
|
55
56
|
ormlambda/databases/my_sql/clauses/__init__.py,sha256=H1DDCYiqAhrxXgovUaju5tsgLv8kU6y8Lh6vZO9uHTM,863
|
56
57
|
ormlambda/databases/my_sql/clauses/alias.py,sha256=Xo0zQwyza3SMMRPIlBJWDQAJdW3bHjrC_UDps26P-QU,989
|
57
58
|
ormlambda/databases/my_sql/clauses/count.py,sha256=rh7KNzpxkKEZpqmFV0oc8xHVgOHVGTGHrPGmCF-eLB4,1384
|
58
59
|
ormlambda/databases/my_sql/clauses/create_database.py,sha256=zpd8uosxKJsf9BULvAHSd1-fU5de8OI7WRqVa8oyiA4,1209
|
59
|
-
ormlambda/databases/my_sql/clauses/delete.py,sha256=
|
60
|
+
ormlambda/databases/my_sql/clauses/delete.py,sha256=jJd6kIDepBJmf5f6CRxHjt-jGePG6iZXbgCDU_rQ-xk,1856
|
60
61
|
ormlambda/databases/my_sql/clauses/drop_database.py,sha256=2GYhtWzHSWM7Yy3v_l2hiY4fFumG8DSCGGLgP0t3Rhk,437
|
61
|
-
ormlambda/databases/my_sql/clauses/drop_table.py,sha256=
|
62
|
-
ormlambda/databases/my_sql/clauses/group_by.py,sha256=
|
62
|
+
ormlambda/databases/my_sql/clauses/drop_table.py,sha256=vPEE7N7z-N0vfVp0t-Qee1TBdZ9Fkvp_rvPP8LAcvdc,673
|
63
|
+
ormlambda/databases/my_sql/clauses/group_by.py,sha256=982UhiUzTHe_tocOXFx3d4SoOYzBN4-V9vgz1rbaBnA,780
|
63
64
|
ormlambda/databases/my_sql/clauses/having.py,sha256=yfRJP3Zw4JEdQPkJtqQ4cZwxcUJTBLlb4e7nTRMaUSk,400
|
64
65
|
ormlambda/databases/my_sql/clauses/insert.py,sha256=xR9IRiJeTIw-65MhnbK_uemMdvIEAaqFPg4IFBtC9Yk,3691
|
65
66
|
ormlambda/databases/my_sql/clauses/joins.py,sha256=PEq7_qxgjJK5R_m8WkqJWppEc-bQFIbAb88qn81uGOg,5170
|
66
67
|
ormlambda/databases/my_sql/clauses/limit.py,sha256=32Fii_WHjrX7K5B7H5uWlzYM6KBMFsE-Uz-70CEvTok,386
|
67
68
|
ormlambda/databases/my_sql/clauses/offset.py,sha256=PKieZvCYLSSza-Nhcam5DJEYv--jBU8RHwju3P_f9Kk,390
|
68
69
|
ormlambda/databases/my_sql/clauses/order.py,sha256=n4vrssvUH9e8vlDHvML6Bclw6KHurkWePQ_WZavVxRE,2316
|
69
|
-
ormlambda/databases/my_sql/clauses/select.py,sha256=
|
70
|
+
ormlambda/databases/my_sql/clauses/select.py,sha256=sxlOGisdEkbjBQtFkUv3YG1jCDyu6rpWWHvmj_Jef5E,1870
|
70
71
|
ormlambda/databases/my_sql/clauses/update.py,sha256=GAXqEPEnUUO-M1zlaTU1Esso0s6lL7nmZWSEErZK2iE,2940
|
71
|
-
ormlambda/databases/my_sql/clauses/upsert.py,sha256=
|
72
|
+
ormlambda/databases/my_sql/clauses/upsert.py,sha256=ULtN81n3dy6GfD0kenq5gu-c6IdscbLeWHk35vo0EqU,2058
|
72
73
|
ormlambda/databases/my_sql/clauses/where.py,sha256=IIyXt98S_ExpC0IHqEO2OL1j-VK9An3Kkbsd2t-2OQU,1694
|
73
74
|
ormlambda/databases/my_sql/functions/__init__.py,sha256=hA8t3mUpV2p-pO4TVp5rjC5Yp7aIkWPsS8NpLi3DUh0,171
|
74
75
|
ormlambda/databases/my_sql/functions/concat.py,sha256=jGUQEj28Gh89ilwJqwFpP5mXyw9tvZ4iC2DrvS4X25M,1346
|
75
76
|
ormlambda/databases/my_sql/functions/max.py,sha256=AjROl4V9RYPMQoo0TomoTB8fRiMyN5-n6hTGRT_G-pY,1461
|
76
77
|
ormlambda/databases/my_sql/functions/min.py,sha256=9g8twv0wUfpxrRK2socnfkJtmd_78pU6HDk_4AiV03c,1487
|
77
78
|
ormlambda/databases/my_sql/functions/sum.py,sha256=PUItqZ4ZbBcOfPzGbYDVvhVKV1RxLMuI63xNbSD8KrA,1487
|
78
|
-
ormlambda/databases/my_sql/
|
79
|
+
ormlambda/databases/my_sql/query_builder.py,sha256=GnOmuH-oOnMf_LP7Aw44fQDnJ51Z1w_OAeJC3MN7byM,5278
|
79
80
|
ormlambda/databases/my_sql/repository/__init__.py,sha256=_T7m-UpgJlx7eYdjBw8jdSVFGnjFYAcbp45g4EM7YEk,54
|
80
81
|
ormlambda/databases/my_sql/repository/repository.py,sha256=DXxY1I4NMA7zshWpzSc6TKf3RlNsOfdk_DDjCF7PoxQ,12149
|
81
|
-
ormlambda/databases/my_sql/statements.py,sha256=
|
82
|
+
ormlambda/databases/my_sql/statements.py,sha256=gvCV9WQc1IsRN4o7ctQcmEAfOZY8KyBIOMTFnPu3qyw,12576
|
82
83
|
ormlambda/databases/my_sql/types.py,sha256=6c7LMS1VGR8ko1LB1T8DQzn1l10Mzk8PfIeYEOb9w30,1839
|
83
|
-
ormlambda/engine/__init__.py,sha256=
|
84
|
+
ormlambda/engine/__init__.py,sha256=Nubog0bQrWZHPsl7g-l3nlFN8be_aHMrQEYfE2RVme8,93
|
84
85
|
ormlambda/engine/create.py,sha256=HwtLi9T_Z7mnZIPfSmutRPT7SlIDFfs82oJuVe-pObo,955
|
85
86
|
ormlambda/engine/template.py,sha256=colmdl-IBSGc1eIqIYShsVkseQwF5_gwwc6Pt8ndN24,1350
|
86
|
-
ormlambda/engine/url.py,sha256=
|
87
|
+
ormlambda/engine/url.py,sha256=qSsFGqZcCzJm8XO4qvjlZQ2qLPiyJvp1WI4GpL43Ftc,25404
|
87
88
|
ormlambda/engine/utils.py,sha256=fFoiKsiFuLcjcBVYNebVoYnMrEj3aZdoxEVSNfCY-GM,522
|
88
89
|
ormlambda/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
89
90
|
ormlambda/model/base_model.py,sha256=S_PYs5ZO-LTgiJSyAmGUtXwFKLb9VnM2Rqlq4pdhppY,1021
|
@@ -93,12 +94,14 @@ ormlambda/repository/interfaces/IDatabaseConnection.py,sha256=pxczjx0b53yjjg5hvV
|
|
93
94
|
ormlambda/repository/interfaces/IRepositoryBase.py,sha256=24AFQ9ZBnFBQtdt3nkyFXkUbEzEsD2P7OS0FnFECJB8,1206
|
94
95
|
ormlambda/repository/interfaces/__init__.py,sha256=t8Mn0aRZm8uF4MGaqjEANTTADCdOwNF0THZ_qebyzwo,126
|
95
96
|
ormlambda/sql/__init__.py,sha256=0CWQzfxhTRWXozoRsg460o_ZwjW9w4uyL5jQUcD4eHg,121
|
96
|
-
ormlambda/sql/clause_info/__init__.py,sha256=
|
97
|
-
ormlambda/sql/clause_info/
|
97
|
+
ormlambda/sql/clause_info/__init__.py,sha256=wOr8M0ZW7fJ-OGHok9eExh7fVP6kiwqGckEsKdE0U7A,255
|
98
|
+
ormlambda/sql/clause_info/aggregate_function_base.py,sha256=X-JFl_2TUU_NH0pnrYxo7nIE5gtQlwSTw4lnNBmioUc,3157
|
99
|
+
ormlambda/sql/clause_info/clause_info.py,sha256=M3toTYXQg7XaNHmRUEwaHit4XaNM9Sck2h6ZX1NIOnE,12136
|
98
100
|
ormlambda/sql/clause_info/clause_info_context.py,sha256=Y32p3x4mqcdNHbAowrKaN_ldnGn7zvaP1UdAkWWryhM,2852
|
99
101
|
ormlambda/sql/clause_info/interface/IAggregate.py,sha256=P-QPaTMAMHVR5M9-ClmL8wsj0uNGG5xpxjuAwWnzKxA,216
|
100
|
-
ormlambda/sql/clause_info/interface/
|
101
|
-
ormlambda/sql/
|
102
|
+
ormlambda/sql/clause_info/interface/IClauseInfo.py,sha256=Gnr6vArgimCt0oJqW-_q2_5jMi8EDBW1wZ8rEF2uzTk,921
|
103
|
+
ormlambda/sql/clause_info/interface/__init__.py,sha256=bTNYVMPuJebEvQpPa5LBQaAesGnfljQ8BKsj1UxN09k,100
|
104
|
+
ormlambda/sql/column.py,sha256=NRGfwmRg3-AMHZk0kz9UzOi9GzDp43A5kgYliqrNSPE,6085
|
102
105
|
ormlambda/sql/comparer.py,sha256=XTi4QT2ICtssCPsF8yrMwLDswnu7lF3MO217hAAY0t8,5334
|
103
106
|
ormlambda/sql/dtypes.py,sha256=Ji4QOyKD0n9bKe7yXIIduy9uEX5BaXolQSIsx0NXYJY,7843
|
104
107
|
ormlambda/sql/foreign_key.py,sha256=lz5TiHmPFKdfL7ESwUt_MnUy2XYUTiOUiQtammoQTwQ,5530
|
@@ -108,15 +111,15 @@ ormlambda/sql/table/fields.py,sha256=ovNR3bJ473aKW-2NhbKr0iJlVpgW06jurHLob2IyZU8
|
|
108
111
|
ormlambda/sql/table/table_constructor.py,sha256=_sc1WnhnjchvIzxQZ85qZJFGZExlmhgKBoeWA-tk1eU,8642
|
109
112
|
ormlambda/sql/types.py,sha256=z5FME0m9j7zSKlxS21cZxHRg0pyTfiJbq7VWZ6IT0kM,832
|
110
113
|
ormlambda/statements/__init__.py,sha256=mFER-VoLf5L2BjdQhWMw6rVQi8kpr-qZzi1ZSWRPIIU,99
|
111
|
-
ormlambda/statements/base_statement.py,sha256=
|
112
|
-
ormlambda/statements/interfaces/IStatements.py,sha256=
|
114
|
+
ormlambda/statements/base_statement.py,sha256=5Z5mnna2h2U165IaHxikq9AEOPfc1Nm5Ca2GXzLqk68,5798
|
115
|
+
ormlambda/statements/interfaces/IStatements.py,sha256=bmvAFAWOUQiBaesfI_VASNjy07zJwH8O489Qz-F0RzU,12762
|
113
116
|
ormlambda/statements/interfaces/__init__.py,sha256=a3RyTNVA7DwWMqvVi7gFYP4MArdU-RUYixJcxfc79HY,76
|
114
117
|
ormlambda/statements/types.py,sha256=0AYnj6WCQcS-4fhsaK_yu2zQR3guPhPluq_sZxH1UhQ,1938
|
115
118
|
ormlambda/utils/__init__.py,sha256=SEgDWkwbSrYRv0If92Ewq53DKnxxv5HqEAQbETd1C6Q,50
|
116
119
|
ormlambda/utils/module_tree/__init__.py,sha256=LNQtqkwO1ul49Th3aHAIiyt0Wt899GmXCc44Uz1eDyY,53
|
117
120
|
ormlambda/utils/module_tree/dfs_traversal.py,sha256=lSF03G63XtJFLp03ueAmsHMBvhUkjptDbK3IugXm8iU,1425
|
118
|
-
ormlambda/utils/module_tree/dynamic_module.py,sha256=
|
119
|
-
ormlambda-3.
|
120
|
-
ormlambda-3.
|
121
|
-
ormlambda-3.
|
122
|
-
ormlambda-3.
|
121
|
+
ormlambda/utils/module_tree/dynamic_module.py,sha256=vJOqvm5-WKksudXBK1IcTn4WsuLxt1qXNISq-_21sy4,8705
|
122
|
+
ormlambda-3.12.2.dist-info/LICENSE,sha256=xBprFw8GJLdHMOoUqDk0427EvjIcbEREvXXVFULuuXU,1080
|
123
|
+
ormlambda-3.12.2.dist-info/METADATA,sha256=IKyumD6YF1P4XuLEszrny77R6H6Hp21SxI_xtC9fQBU,13377
|
124
|
+
ormlambda-3.12.2.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
125
|
+
ormlambda-3.12.2.dist-info/RECORD,,
|
@@ -1,39 +0,0 @@
|
|
1
|
-
from datetime import datetime
|
2
|
-
from typing import Optional
|
3
|
-
from shapely import Point
|
4
|
-
from types import NoneType
|
5
|
-
from ormlambda.common.abstract_classes.caster.cast_base import ReadCastBase
|
6
|
-
|
7
|
-
|
8
|
-
from .types.datetime import MySQLReadDatetime
|
9
|
-
from .types.string import MySQLReadString
|
10
|
-
from .types.int import MySQLReadInt
|
11
|
-
from .types.float import MySQLReadFloat
|
12
|
-
from .types.point import MySQLReadPoint
|
13
|
-
from .types.none import MySQLReadNoneType
|
14
|
-
|
15
|
-
|
16
|
-
class MySQLReadCastBase(ReadCastBase):
|
17
|
-
@staticmethod
|
18
|
-
def cast_str(value: str) -> str:
|
19
|
-
return MySQLReadString.cast(value)
|
20
|
-
|
21
|
-
@staticmethod
|
22
|
-
def cast_int(value: str) -> int:
|
23
|
-
return MySQLReadInt.cast(value)
|
24
|
-
|
25
|
-
@staticmethod
|
26
|
-
def cast_float(value: str) -> float:
|
27
|
-
return MySQLReadFloat.cast(value)
|
28
|
-
|
29
|
-
@staticmethod
|
30
|
-
def cast_Point(value: str) -> Point:
|
31
|
-
return MySQLReadPoint.cast(value)
|
32
|
-
|
33
|
-
@staticmethod
|
34
|
-
def cast_NoneType(value: str) -> NoneType:
|
35
|
-
return MySQLReadNoneType.cast(value)
|
36
|
-
|
37
|
-
@staticmethod
|
38
|
-
def cast_datetime(value: str) -> datetime:
|
39
|
-
return MySQLReadDatetime.cast(value)
|
@@ -1,37 +0,0 @@
|
|
1
|
-
from datetime import datetime
|
2
|
-
from shapely import Point
|
3
|
-
from types import NoneType
|
4
|
-
from ormlambda.common.abstract_classes.caster.cast_base import WriteCastBase
|
5
|
-
|
6
|
-
from .types.datetime import MySQLWriteDatetime
|
7
|
-
from .types.string import MySQLWriteString
|
8
|
-
from .types.int import MySQLWriteInt
|
9
|
-
from .types.float import MySQLWriteFloat
|
10
|
-
from .types.point import MySQLWritePoint
|
11
|
-
from .types.none import MySQLWriteNoneType
|
12
|
-
|
13
|
-
|
14
|
-
class MySQLWriteCastBase(WriteCastBase):
|
15
|
-
@staticmethod
|
16
|
-
def cast_str(value: str, insert_data: bool = False) -> str:
|
17
|
-
return MySQLWriteString.cast(value, insert_data)
|
18
|
-
|
19
|
-
@staticmethod
|
20
|
-
def cast_int(value: int, insert_data: bool = False) -> str:
|
21
|
-
return MySQLWriteInt.cast(value, insert_data)
|
22
|
-
|
23
|
-
@staticmethod
|
24
|
-
def cast_float(value: float, insert_data: bool = False) -> str:
|
25
|
-
return MySQLWriteFloat.cast(value, insert_data)
|
26
|
-
|
27
|
-
@staticmethod
|
28
|
-
def cast_Point(value: Point, insert_data: bool = False) -> str:
|
29
|
-
return MySQLWritePoint.cast(value, insert_data)
|
30
|
-
|
31
|
-
@staticmethod
|
32
|
-
def cast_NoneType(value: NoneType, insert_data: bool = False) -> str:
|
33
|
-
return MySQLWriteNoneType.cast(value, insert_data)
|
34
|
-
|
35
|
-
@staticmethod
|
36
|
-
def cast_datetime(value: datetime, insert_data: bool = False) -> str:
|
37
|
-
return MySQLWriteDatetime.cast(value, insert_data)
|
File without changes
|
File without changes
|