ormlambda 3.7.1__tar.gz → 3.7.2__tar.gz
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-3.7.1 → ormlambda-3.7.2}/PKG-INFO +1 -1
- {ormlambda-3.7.1 → ormlambda-3.7.2}/pyproject.toml +1 -1
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/caster/base_caster.py +3 -3
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/global_checker.py +1 -1
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/components/select/ISelect.py +4 -4
- ormlambda-3.7.2/src/ormlambda/components/select/__init__.py +1 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/caster/types/bytes.py +3 -3
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/caster/types/datetime.py +3 -3
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/caster/types/float.py +3 -3
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/caster/types/int.py +3 -3
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/caster/types/iterable.py +3 -3
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/caster/types/none.py +3 -3
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/caster/types/string.py +3 -3
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/update.py +1 -1
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/join_context.py +0 -1
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/repository/repository.py +3 -2
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/statements.py +1 -1
- ormlambda-3.7.2/src/ormlambda/databases/my_sql/types.py +73 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/repository/base_repository.py +2 -2
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/repository/interfaces/IRepositoryBase.py +1 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/table/table_constructor.py +2 -2
- ormlambda-3.7.1/src/ormlambda/components/select/__init__.py +0 -1
- {ormlambda-3.7.1 → ormlambda-3.7.2}/LICENSE +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/README.md +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/caster/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/caster/caster.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/caster/interfaces/ICaster.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/caster/interfaces/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/abstract_classes/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/abstract_classes/decomposition_query.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/abstract_classes/non_query_base.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/abstract_classes/query_base.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/enums/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/enums/condition_types.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/enums/join_type.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/errors/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/interfaces/ICustomAlias.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/interfaces/IDecompositionQuery.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/interfaces/IJoinSelector.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/interfaces/INonQueryCommand.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/interfaces/IQueryCommand.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/interfaces/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/components/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/components/delete/IDelete.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/components/delete/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/components/delete/abstract_delete.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/components/insert/IInsert.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/components/insert/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/components/insert/abstract_insert.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/components/update/IUpdate.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/components/update/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/components/update/abstract_update.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/components/upsert/IUpsert.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/components/upsert/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/components/upsert/abstract_upsert.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/caster/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/caster/caster.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/caster/read.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/caster/types/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/caster/types/point.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/caster/write.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/ST_AsText.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/ST_Contains.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/alias.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/count.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/create_database.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/delete.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/drop_database.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/drop_table.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/group_by.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/insert.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/joins.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/limit.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/offset.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/order.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/select.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/upsert.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/where.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/functions/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/functions/concat.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/functions/max.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/functions/min.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/functions/sum.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/repository/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/engine/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/engine/template.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/model/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/model/base_model.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/repository/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/repository/interfaces/IDatabaseConnection.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/repository/interfaces/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/clause_info/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/clause_info/clause_info.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/clause_info/clause_info_context.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/clause_info/interface/IAggregate.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/clause_info/interface/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/column.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/comparer.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/dtypes.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/foreign_key.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/interfaces/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/table/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/table/fields.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/sql/types.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/statements/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/statements/base_statement.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/statements/interfaces/IStatements.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/statements/interfaces/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/statements/types.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/utils/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/utils/module_tree/__init__.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/utils/module_tree/dfs_traversal.py +0 -0
- {ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/utils/module_tree/dynamic_module.py +0 -0
@@ -3,7 +3,7 @@ line-length = 320
|
|
3
3
|
|
4
4
|
[tool.poetry]
|
5
5
|
name = "ormlambda"
|
6
|
-
version = "3.7.
|
6
|
+
version = "3.7.2"
|
7
7
|
description = "ORM designed to interact with the database (currently with MySQL) using lambda functions and nested functions"
|
8
8
|
authors = ["p-hzamora <p.hzamora@icloud.com>"]
|
9
9
|
readme = "README.md"
|
@@ -14,7 +14,7 @@ class BaseCaster[TProp, TType](abc.ABC):
|
|
14
14
|
def wildcard_to_select(self, value: str) -> str: ...
|
15
15
|
@overload
|
16
16
|
def wildcard_to_select(self) -> str: ...
|
17
|
-
|
17
|
+
|
18
18
|
@abc.abstractmethod
|
19
19
|
def wildcard_to_select(self) -> str: ...
|
20
20
|
|
@@ -22,7 +22,7 @@ class BaseCaster[TProp, TType](abc.ABC):
|
|
22
22
|
def wildcard_to_where(self, value: str) -> str: ...
|
23
23
|
@overload
|
24
24
|
def wildcard_to_where(self) -> str: ...
|
25
|
-
|
25
|
+
|
26
26
|
@abc.abstractmethod
|
27
27
|
def wildcard_to_where(self) -> str: ...
|
28
28
|
|
@@ -30,7 +30,7 @@ class BaseCaster[TProp, TType](abc.ABC):
|
|
30
30
|
def wildcard_to_insert(self, value: str) -> str: ...
|
31
31
|
@overload
|
32
32
|
def wildcard_to_insert(self) -> str: ...
|
33
|
-
|
33
|
+
|
34
34
|
@abc.abstractmethod
|
35
35
|
def wildcard_to_insert(self) -> str: ...
|
36
36
|
|
@@ -23,6 +23,6 @@ class GlobalChecker:
|
|
23
23
|
except TypeError as err:
|
24
24
|
cond1 = r"takes \d+ positional argument but \d+ were given"
|
25
25
|
cond2 = r"missing \d+ required positional arguments:"
|
26
|
-
if re.search(r"("+f"{cond1}|{cond2}"+r")", err.args[0]):
|
26
|
+
if re.search(r"(" + f"{cond1}|{cond2}" + r")", err.args[0]):
|
27
27
|
raise UnmatchedLambdaParameterError(len(tables), obj)
|
28
28
|
raise err
|
@@ -6,12 +6,12 @@ from typing import TYPE_CHECKING
|
|
6
6
|
if TYPE_CHECKING:
|
7
7
|
from ormlambda.sql.clause_info import ClauseInfo
|
8
8
|
|
9
|
+
|
9
10
|
class ISelect(IQuery):
|
10
11
|
@property
|
11
12
|
@abc.abstractmethod
|
12
|
-
def FROM(self)->ClauseInfo: ...
|
13
|
-
|
13
|
+
def FROM(self) -> ClauseInfo: ...
|
14
|
+
|
14
15
|
@property
|
15
16
|
@abc.abstractmethod
|
16
|
-
def COLUMNS(self)->str: ...
|
17
|
-
|
17
|
+
def COLUMNS(self) -> str: ...
|
@@ -0,0 +1 @@
|
|
1
|
+
from .ISelect import ISelect # noqa: F401
|
@@ -6,13 +6,13 @@ class BytesCaster[TType](BaseCaster[bytes, TType]):
|
|
6
6
|
def __init__(self, value: bytes, type_value: TType):
|
7
7
|
super().__init__(value, type_value)
|
8
8
|
|
9
|
-
def wildcard_to_select(self, value:str = PLACEHOLDER) -> str:
|
9
|
+
def wildcard_to_select(self, value: str = PLACEHOLDER) -> str:
|
10
10
|
return value
|
11
11
|
|
12
|
-
def wildcard_to_where(self, value:str = PLACEHOLDER) -> str:
|
12
|
+
def wildcard_to_where(self, value: str = PLACEHOLDER) -> str:
|
13
13
|
return value
|
14
14
|
|
15
|
-
def wildcard_to_insert(self, value:str = PLACEHOLDER) -> str:
|
15
|
+
def wildcard_to_insert(self, value: str = PLACEHOLDER) -> str:
|
16
16
|
return value
|
17
17
|
|
18
18
|
@property
|
@@ -8,13 +8,13 @@ class DatetimeCaster[TType](BaseCaster[datetime, TType]):
|
|
8
8
|
def __init__(self, value: datetime, type_value: TType):
|
9
9
|
super().__init__(value, type_value)
|
10
10
|
|
11
|
-
def wildcard_to_select(self, value:str=PLACEHOLDER) -> str:
|
11
|
+
def wildcard_to_select(self, value: str = PLACEHOLDER) -> str:
|
12
12
|
return value
|
13
13
|
|
14
|
-
def wildcard_to_where(self, value:str=PLACEHOLDER) -> str:
|
14
|
+
def wildcard_to_where(self, value: str = PLACEHOLDER) -> str:
|
15
15
|
return value
|
16
16
|
|
17
|
-
def wildcard_to_insert(self, value:str=PLACEHOLDER) -> str:
|
17
|
+
def wildcard_to_insert(self, value: str = PLACEHOLDER) -> str:
|
18
18
|
return value
|
19
19
|
|
20
20
|
@property
|
@@ -6,13 +6,13 @@ class FloatCaster[TType](BaseCaster[float, TType]):
|
|
6
6
|
def __init__(self, value: float, type_value: TType):
|
7
7
|
super().__init__(value, type_value)
|
8
8
|
|
9
|
-
def wildcard_to_select(self, value:str=PLACEHOLDER) -> str:
|
9
|
+
def wildcard_to_select(self, value: str = PLACEHOLDER) -> str:
|
10
10
|
return value
|
11
11
|
|
12
|
-
def wildcard_to_where(self, value:str=PLACEHOLDER) -> str:
|
12
|
+
def wildcard_to_where(self, value: str = PLACEHOLDER) -> str:
|
13
13
|
return value
|
14
14
|
|
15
|
-
def wildcard_to_insert(self, value:str=PLACEHOLDER) -> str:
|
15
|
+
def wildcard_to_insert(self, value: str = PLACEHOLDER) -> str:
|
16
16
|
return value
|
17
17
|
|
18
18
|
@property
|
@@ -6,13 +6,13 @@ class IntegerCaster[TType](BaseCaster[int, TType]):
|
|
6
6
|
def __init__(self, value: int, type_value: TType):
|
7
7
|
super().__init__(value, type_value)
|
8
8
|
|
9
|
-
def wildcard_to_select(self, value:str=PLACEHOLDER) -> str:
|
9
|
+
def wildcard_to_select(self, value: str = PLACEHOLDER) -> str:
|
10
10
|
return value
|
11
11
|
|
12
|
-
def wildcard_to_where(self, value:str=PLACEHOLDER) -> str:
|
12
|
+
def wildcard_to_where(self, value: str = PLACEHOLDER) -> str:
|
13
13
|
return value
|
14
14
|
|
15
|
-
def wildcard_to_insert(self, value:str=PLACEHOLDER) -> str:
|
15
|
+
def wildcard_to_insert(self, value: str = PLACEHOLDER) -> str:
|
16
16
|
return value
|
17
17
|
|
18
18
|
@property
|
@@ -6,13 +6,13 @@ class IterableCaster[TType](BaseCaster[bytes, TType]):
|
|
6
6
|
def __init__(self, value: bytes, type_value: TType):
|
7
7
|
super().__init__(value, type_value)
|
8
8
|
|
9
|
-
def wildcard_to_select(self, value:str=PLACEHOLDER) -> str:
|
9
|
+
def wildcard_to_select(self, value: str = PLACEHOLDER) -> str:
|
10
10
|
return value
|
11
11
|
|
12
|
-
def wildcard_to_where(self, value:str=PLACEHOLDER) -> str:
|
12
|
+
def wildcard_to_where(self, value: str = PLACEHOLDER) -> str:
|
13
13
|
return value
|
14
14
|
|
15
|
-
def wildcard_to_insert(self, value:str=PLACEHOLDER) -> str:
|
15
|
+
def wildcard_to_insert(self, value: str = PLACEHOLDER) -> str:
|
16
16
|
return value
|
17
17
|
|
18
18
|
@property
|
@@ -6,13 +6,13 @@ class NoneTypeCaster[TType](BaseCaster[NoneType, TType]):
|
|
6
6
|
def __init__(self, value: NoneType, type_value: TType):
|
7
7
|
super().__init__(value, type_value)
|
8
8
|
|
9
|
-
def wildcard_to_select(self, value:str=PLACEHOLDER) -> str:
|
9
|
+
def wildcard_to_select(self, value: str = PLACEHOLDER) -> str:
|
10
10
|
return value
|
11
11
|
|
12
|
-
def wildcard_to_where(self, value:str=PLACEHOLDER) -> str:
|
12
|
+
def wildcard_to_where(self, value: str = PLACEHOLDER) -> str:
|
13
13
|
return value
|
14
14
|
|
15
|
-
def wildcard_to_insert(self, value:str=PLACEHOLDER) -> str:
|
15
|
+
def wildcard_to_insert(self, value: str = PLACEHOLDER) -> str:
|
16
16
|
return value
|
17
17
|
|
18
18
|
# TODOL: cheched if it's right
|
@@ -6,13 +6,13 @@ class StringCaster[TType](BaseCaster[str, TType]):
|
|
6
6
|
def __init__(self, value: str, type_value: TType):
|
7
7
|
super().__init__(value, type_value)
|
8
8
|
|
9
|
-
def wildcard_to_select(self, value:str = PLACEHOLDER) -> str:
|
9
|
+
def wildcard_to_select(self, value: str = PLACEHOLDER) -> str:
|
10
10
|
return value
|
11
11
|
|
12
|
-
def wildcard_to_where(self, value:str = PLACEHOLDER) -> str:
|
12
|
+
def wildcard_to_where(self, value: str = PLACEHOLDER) -> str:
|
13
13
|
return value
|
14
14
|
|
15
|
-
def wildcard_to_insert(self, value:str = PLACEHOLDER) -> str:
|
15
|
+
def wildcard_to_insert(self, value: str = PLACEHOLDER) -> str:
|
16
16
|
return value
|
17
17
|
|
18
18
|
@property
|
@@ -56,7 +56,7 @@ class UpdateQuery[T: Type[Table]](UpdateQueryBase[T, IRepositoryBase]):
|
|
56
56
|
|
57
57
|
if self.__is_valid__(col):
|
58
58
|
clean_data = CASTER.for_value(value)
|
59
|
-
col_names.append((col.column_name,clean_data.wildcard_to_insert()))
|
59
|
+
col_names.append((col.column_name, clean_data.wildcard_to_insert()))
|
60
60
|
self._values.append(clean_data.to_database)
|
61
61
|
|
62
62
|
set_query: str = ",".join(["=".join(col_data) for col_data in col_names])
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
import contextlib
|
3
3
|
from pathlib import Path
|
4
|
-
from typing import Any, Generator, Iterable, Optional, Type, override, TYPE_CHECKING
|
4
|
+
from typing import Any, Generator, Iterable, Optional, Type, override, TYPE_CHECKING, Unpack
|
5
5
|
import shapely as shp
|
6
6
|
|
7
7
|
# from mysql.connector.pooling import MySQLConnectionPool
|
@@ -22,6 +22,7 @@ if TYPE_CHECKING:
|
|
22
22
|
from ormlambda.common.abstract_classes.decomposition_query import ClauseInfo
|
23
23
|
from ormlambda import Table
|
24
24
|
from ormlambda.databases.my_sql.clauses.select import Select
|
25
|
+
from ..types import MySQLArgs
|
25
26
|
|
26
27
|
type TResponse[TFlavour, *Ts] = TFlavour | tuple[dict[str, tuple[*Ts]]] | tuple[tuple[*Ts]] | tuple[TFlavour]
|
27
28
|
|
@@ -155,7 +156,7 @@ class MySQLRepository(BaseRepository[MySQLConnectionPool]):
|
|
155
156
|
|
156
157
|
#
|
157
158
|
|
158
|
-
def __init__(self, **kwargs):
|
159
|
+
def __init__(self, **kwargs: Unpack[MySQLArgs]):
|
159
160
|
super().__init__(MySQLConnectionPool, **kwargs)
|
160
161
|
|
161
162
|
@contextlib.contextmanager
|
@@ -372,7 +372,7 @@ class MySQLStatements[T: Table, *Ts](BaseStatement[T, MySQLConnection]):
|
|
372
372
|
):
|
373
373
|
self.limit(1)
|
374
374
|
|
375
|
-
response = self.select(selector=selector, flavour=flavour, by=by
|
375
|
+
response = self.select(selector=selector, flavour=flavour, by=by, **kwargs)
|
376
376
|
|
377
377
|
if not isinstance(response, Iterable):
|
378
378
|
return response
|
@@ -0,0 +1,73 @@
|
|
1
|
+
from typing import Callable, Optional, Type, TypedDict, Any
|
2
|
+
|
3
|
+
from mysql.connector.constants import (
|
4
|
+
CharacterSet,
|
5
|
+
ClientFlag,
|
6
|
+
)
|
7
|
+
from mysql.connector.types import HandShakeType, BinaryProtocolType
|
8
|
+
from mysql.connector.conversion import MySQLConverter
|
9
|
+
|
10
|
+
|
11
|
+
class MySQLArgs(TypedDict):
|
12
|
+
client_flags: ClientFlag | int
|
13
|
+
sql_mode: Optional[str]
|
14
|
+
time_zone: Optional[str]
|
15
|
+
autocommit: bool
|
16
|
+
server_version: Optional[tuple[int, ...]]
|
17
|
+
handshake: Optional[HandShakeType]
|
18
|
+
conn_attrs: dict[str, str]
|
19
|
+
|
20
|
+
user: str
|
21
|
+
password: str
|
22
|
+
password1: str
|
23
|
+
password2: str
|
24
|
+
password3: str
|
25
|
+
database: str
|
26
|
+
host: str
|
27
|
+
port: int
|
28
|
+
unix_socket: Optional[str]
|
29
|
+
client_host: str
|
30
|
+
client_port: int
|
31
|
+
ssl: dict[str, Optional[str | bool | list[str]]]
|
32
|
+
ssl_disabled: bool
|
33
|
+
force_ipv6: bool
|
34
|
+
oci_config_file: Optional[str]
|
35
|
+
oci_config_profile: Optional[str]
|
36
|
+
webauthn_callback: Optional[str | Callable[[str], None]]
|
37
|
+
krb_service_principal: Optional[str]
|
38
|
+
openid_token_file: Optional[str]
|
39
|
+
|
40
|
+
use_unicode: bool
|
41
|
+
get_warnings: bool
|
42
|
+
raise_on_warnings: bool
|
43
|
+
connection_timeout: Optional[int]
|
44
|
+
read_timeout: Optional[int]
|
45
|
+
write_timeout: Optional[int]
|
46
|
+
buffered: bool
|
47
|
+
unread_result: bool
|
48
|
+
have_next_result: bool
|
49
|
+
raw: bool
|
50
|
+
in_transaction: bool
|
51
|
+
allow_local_infile: bool
|
52
|
+
allow_local_infile_in_path: Optional[str]
|
53
|
+
|
54
|
+
prepared_statements: Any
|
55
|
+
query_attrs: dict[str, BinaryProtocolType]
|
56
|
+
|
57
|
+
ssl_active: bool
|
58
|
+
auth_plugin: Optional[str]
|
59
|
+
auth_plugin_class: Optional[str]
|
60
|
+
pool_config_version: Any
|
61
|
+
converter_class: Optional[Type[MySQLConverter]]
|
62
|
+
converter_str_fallback: bool
|
63
|
+
compress: bool
|
64
|
+
|
65
|
+
consume_results: bool
|
66
|
+
init_command: Optional[str]
|
67
|
+
character_set: CharacterSet
|
68
|
+
|
69
|
+
|
70
|
+
__all__ = [
|
71
|
+
"MySQLArgs",
|
72
|
+
"ClientFlag",
|
73
|
+
]
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import contextlib
|
2
|
-
from typing import Generator, Type
|
2
|
+
from typing import Generator, Type, Unpack
|
3
3
|
from ormlambda.repository import IRepositoryBase
|
4
4
|
import abc
|
5
5
|
|
6
6
|
|
7
7
|
class BaseRepository[TPool](IRepositoryBase):
|
8
|
-
def __init__(self, pool: Type[TPool], **kwargs:
|
8
|
+
def __init__[TArgs](self, pool: Type[TPool], **kwargs: Unpack[TArgs]) -> None:
|
9
9
|
self._data_config: dict[str, str] = kwargs
|
10
10
|
self._pool: TPool = pool(**kwargs)
|
11
11
|
|
@@ -170,8 +170,8 @@ class Table(metaclass=TableMeta):
|
|
170
170
|
return tuple([x for x in cls.__annotations__.values() if isinstance(x, Column)])
|
171
171
|
|
172
172
|
@classmethod
|
173
|
-
def get_column[TProp](cls,name:str) -> Column[TProp]:
|
174
|
-
for key,value in cls.__annotations__.items():
|
173
|
+
def get_column[TProp](cls, name: str) -> Column[TProp]:
|
174
|
+
for key, value in cls.__annotations__.items():
|
175
175
|
if name == key:
|
176
176
|
return value
|
177
177
|
|
@@ -1 +0,0 @@
|
|
1
|
-
from .ISelect import ISelect # noqa: F401
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/common/abstract_classes/decomposition_query.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/databases/my_sql/clauses/create_database.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ormlambda-3.7.1 → ormlambda-3.7.2}/src/ormlambda/repository/interfaces/IDatabaseConnection.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|