ormlambda 3.11.0__tar.gz → 3.11.1__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.11.0 → ormlambda-3.11.1}/PKG-INFO +1 -1
- {ormlambda-3.11.0 → ormlambda-3.11.1}/pyproject.toml +1 -1
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/functions/max.py +1 -1
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/statements.py +21 -20
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/statements/interfaces/IStatements.py +16 -21
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/statements/types.py +5 -2
- {ormlambda-3.11.0 → ormlambda-3.11.1}/LICENSE +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/README.md +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/caster/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/caster/base_caster.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/caster/caster.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/caster/interfaces/ICaster.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/caster/interfaces/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/abstract_classes/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/abstract_classes/decomposition_query.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/abstract_classes/non_query_base.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/abstract_classes/query_base.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/enums/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/enums/condition_types.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/enums/join_type.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/errors/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/global_checker.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/interfaces/ICustomAlias.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/interfaces/IDecompositionQuery.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/interfaces/IJoinSelector.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/interfaces/INonQueryCommand.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/interfaces/IQueryCommand.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/interfaces/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/delete/IDelete.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/delete/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/delete/abstract_delete.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/insert/IInsert.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/insert/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/insert/abstract_insert.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/select/ISelect.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/select/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/update/IUpdate.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/update/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/update/abstract_update.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/upsert/IUpsert.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/upsert/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/components/upsert/abstract_upsert.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/caster.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/read.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/types/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/types/bytes.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/types/datetime.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/types/float.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/types/int.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/types/iterable.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/types/none.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/types/point.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/types/string.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/write.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/ST_AsText.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/ST_Contains.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/alias.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/count.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/create_database.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/delete.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/drop_database.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/drop_table.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/group_by.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/having.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/insert.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/joins.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/limit.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/offset.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/order.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/select.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/update.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/upsert.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/where.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/functions/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/functions/concat.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/functions/min.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/functions/sum.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/join_context.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/repository/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/repository/repository.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/types.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/engine/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/engine/create.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/engine/template.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/engine/url.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/engine/utils.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/model/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/model/base_model.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/repository/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/repository/base_repository.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/repository/interfaces/IDatabaseConnection.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/repository/interfaces/IRepositoryBase.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/repository/interfaces/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/clause_info/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/clause_info/clause_info.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/clause_info/clause_info_context.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/clause_info/interface/IAggregate.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/clause_info/interface/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/column.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/comparer.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/dtypes.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/foreign_key.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/interfaces/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/table/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/table/fields.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/table/table_constructor.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/sql/types.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/statements/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/statements/base_statement.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/statements/interfaces/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/utils/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/utils/module_tree/__init__.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/utils/module_tree/dfs_traversal.py +0 -0
- {ormlambda-3.11.0 → ormlambda-3.11.1}/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.11.
|
6
|
+
version = "3.11.1"
|
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 Max(AggregateFunctionBase[None]):
|
|
14
14
|
|
15
15
|
def __init__[TProp](
|
16
16
|
self,
|
17
|
-
elements:
|
17
|
+
elements: ColumnType[TProp],
|
18
18
|
alias_clause: AliasType[ColumnType[TProp]] = "max",
|
19
19
|
context: ClauseContextType = None,
|
20
20
|
):
|
@@ -14,6 +14,7 @@ if TYPE_CHECKING:
|
|
14
14
|
from ormlambda import Table
|
15
15
|
from ormlambda.statements.types import OrderTypes
|
16
16
|
from ormlambda.sql.types import ColumnType
|
17
|
+
from ormlambda.statements.types import SelectCols
|
17
18
|
from ormlambda.repository.interfaces import IRepositoryBase
|
18
19
|
from ormlambda.statements.interfaces import IStatements_two_generic
|
19
20
|
from ormlambda.repository.interfaces.IRepositoryBase import TypeExists
|
@@ -289,25 +290,23 @@ class MySQLStatements[T: Table, *Ts](BaseStatement[T, MySQLConnection]):
|
|
289
290
|
return self
|
290
291
|
|
291
292
|
@override
|
292
|
-
def count(
|
293
|
+
def count[TProp](
|
293
294
|
self,
|
294
|
-
selection: None |
|
295
|
-
|
295
|
+
selection: None | SelectCols[T,TProp] = lambda x: "*",
|
296
|
+
alias="count",
|
296
297
|
execute: bool = False,
|
297
298
|
) -> Optional[int]:
|
298
299
|
if execute is True:
|
299
|
-
return self.select_one(self.count(selection,
|
300
|
+
return self.select_one(self.count(selection, alias, False), flavour=dict)[alias]
|
300
301
|
|
301
|
-
|
302
|
-
|
303
|
-
return Count(element=selection, alias_clause=alias_clause, context=self._query_builder._context)
|
302
|
+
selection = GlobalChecker.resolved_callback_object(selection, self.models)
|
303
|
+
return Count(element=selection, alias_clause=alias, context=self._query_builder._context)
|
304
304
|
|
305
305
|
@override
|
306
306
|
def where(self, conditions: WhereTypes) -> IStatements_two_generic[T, MySQLConnection]:
|
307
307
|
# FIXME [x]: I've wrapped self._model into tuple to pass it instance attr. Idk if it's correct
|
308
308
|
|
309
|
-
|
310
|
-
conditions = GlobalChecker.resolved_callback_object(conditions, self._models)
|
309
|
+
conditions = GlobalChecker.resolved_callback_object(conditions, self._models)
|
311
310
|
if not isinstance(conditions, Iterable):
|
312
311
|
conditions = (conditions,)
|
313
312
|
self._query_builder.add_statement(Where(*conditions))
|
@@ -315,8 +314,7 @@ class MySQLStatements[T: Table, *Ts](BaseStatement[T, MySQLConnection]):
|
|
315
314
|
|
316
315
|
@override
|
317
316
|
def having(self, conditions: WhereTypes) -> IStatements_two_generic[T, MySQLConnection]:
|
318
|
-
|
319
|
-
conditions = GlobalChecker.resolved_callback_object(conditions, self._models)
|
317
|
+
conditions = GlobalChecker.resolved_callback_object(conditions, self._models)
|
320
318
|
if not isinstance(conditions, Iterable):
|
321
319
|
conditions = (conditions,)
|
322
320
|
self._query_builder.add_statement(Having(*conditions))
|
@@ -324,13 +322,13 @@ class MySQLStatements[T: Table, *Ts](BaseStatement[T, MySQLConnection]):
|
|
324
322
|
|
325
323
|
@override
|
326
324
|
def order[TValue](self, columns: Callable[[T], TValue], order_type: OrderTypes) -> IStatements_two_generic[T, MySQLConnection]:
|
327
|
-
query = GlobalChecker.resolved_callback_object(columns, self._models)
|
325
|
+
query = GlobalChecker.resolved_callback_object(columns, self._models)
|
328
326
|
order = Order(query, order_type)
|
329
327
|
self._query_builder.add_statement(order)
|
330
328
|
return self
|
331
329
|
|
332
330
|
@override
|
333
|
-
def concat(self, selector:
|
331
|
+
def concat(self, selector: SelectCols[T, str], alias: str = "concat") -> IAggregate:
|
334
332
|
return func.Concat[T](
|
335
333
|
values=selector,
|
336
334
|
alias_clause=alias,
|
@@ -340,10 +338,11 @@ class MySQLStatements[T: Table, *Ts](BaseStatement[T, MySQLConnection]):
|
|
340
338
|
@override
|
341
339
|
def max[TProp](
|
342
340
|
self,
|
343
|
-
column:
|
341
|
+
column: SelectCols[T, TProp],
|
344
342
|
alias: str = "max",
|
345
343
|
execute: bool = False,
|
346
|
-
) ->
|
344
|
+
) -> int:
|
345
|
+
column = GlobalChecker.resolved_callback_object(column, self.models)
|
347
346
|
if execute is True:
|
348
347
|
return self.select_one(self.max(column, alias, execute=False), flavour=dict)[alias]
|
349
348
|
return func.Max(elements=column, alias_clause=alias, context=self._query_builder._context)
|
@@ -351,10 +350,11 @@ class MySQLStatements[T: Table, *Ts](BaseStatement[T, MySQLConnection]):
|
|
351
350
|
@override
|
352
351
|
def min[TProp](
|
353
352
|
self,
|
354
|
-
column:
|
353
|
+
column: SelectCols[T, TProp],
|
355
354
|
alias: str = "min",
|
356
355
|
execute: bool = False,
|
357
|
-
) ->
|
356
|
+
) -> int:
|
357
|
+
column = GlobalChecker.resolved_callback_object(column, self.models)
|
358
358
|
if execute is True:
|
359
359
|
return self.select_one(self.min(column, alias, execute=False), flavour=dict)[alias]
|
360
360
|
return func.Min(elements=column, alias_clause=alias, context=self._query_builder._context)
|
@@ -362,10 +362,11 @@ class MySQLStatements[T: Table, *Ts](BaseStatement[T, MySQLConnection]):
|
|
362
362
|
@override
|
363
363
|
def sum[TProp](
|
364
364
|
self,
|
365
|
-
column:
|
365
|
+
column: SelectCols[T, TProp],
|
366
366
|
alias: str = "sum",
|
367
367
|
execute: bool = False,
|
368
|
-
) ->
|
368
|
+
) -> int:
|
369
|
+
column = GlobalChecker.resolved_callback_object(column, self.models)
|
369
370
|
if execute is True:
|
370
371
|
return self.select_one(self.sum(column, alias, execute=False), flavour=dict)[alias]
|
371
372
|
return func.Sum(elements=column, alias_clause=alias, context=self._query_builder._context)
|
@@ -384,7 +385,7 @@ class MySQLStatements[T: Table, *Ts](BaseStatement[T, MySQLConnection]):
|
|
384
385
|
by: JoinType = JoinType.INNER_JOIN,
|
385
386
|
**kwargs,
|
386
387
|
):
|
387
|
-
select_clause = GlobalChecker.resolved_callback_object(selector, self._models)
|
388
|
+
select_clause = GlobalChecker.resolved_callback_object(selector, self._models)
|
388
389
|
|
389
390
|
if selector is None:
|
390
391
|
# COMMENT: if we do not specify any lambda function we assumed the user want to retreive only elements of the Model itself avoiding other models
|
@@ -27,10 +27,9 @@ from ..types import (
|
|
27
27
|
Select10,
|
28
28
|
TypeExists,
|
29
29
|
WhereTypes,
|
30
|
+
SelectCols,
|
30
31
|
)
|
31
32
|
|
32
|
-
type SelectCols[T, TProp] = Callable[[T], ColumnType[TProp]] | ColumnType[TProp]
|
33
|
-
|
34
33
|
|
35
34
|
class IStatements[T: Table](ABC):
|
36
35
|
@abstractmethod
|
@@ -132,12 +131,12 @@ class IStatements[T: Table](ABC):
|
|
132
131
|
# endregion
|
133
132
|
# region count
|
134
133
|
@abstractmethod
|
135
|
-
def count(
|
134
|
+
def count[TProp](
|
136
135
|
self,
|
137
|
-
selection:
|
138
|
-
|
136
|
+
selection: None | SelectCols[T, TProp] = ...,
|
137
|
+
alias: str = ...,
|
139
138
|
execute: bool = False,
|
140
|
-
) -> Optional[
|
139
|
+
) -> Optional[int]: ...
|
141
140
|
|
142
141
|
# endregion
|
143
142
|
# region delete
|
@@ -174,45 +173,41 @@ class IStatements[T: Table](ABC):
|
|
174
173
|
|
175
174
|
# endregion
|
176
175
|
# region order
|
177
|
-
@overload
|
178
|
-
def order[TValue](self, _lambda_col: Callable[[T], TValue]) -> IStatements[T]: ...
|
179
|
-
@overload
|
180
|
-
def order[TValue](self, _lambda_col: Callable[[T], TValue], order_type: OrderTypes) -> IStatements[T]: ...
|
181
176
|
@abstractmethod
|
182
|
-
def order[TValue](self,
|
177
|
+
def order[TValue](self, columns: SelectCols[T, TValue], order_type: OrderTypes) -> IStatements[T]: ...
|
183
178
|
|
184
179
|
# endregion
|
185
180
|
# region concat
|
186
181
|
@overload
|
187
|
-
def concat(self, selector:
|
182
|
+
def concat(self, selector: SelectCols[T, str], alias: str = "concat") -> IAggregate: ...
|
188
183
|
|
189
184
|
# endregion
|
190
185
|
# region max
|
191
|
-
@
|
186
|
+
@abstractmethod
|
192
187
|
def max[TProp](
|
193
188
|
self,
|
194
189
|
column: SelectCols[T, TProp],
|
195
190
|
alias: Optional[str] = ...,
|
196
|
-
execute: bool =
|
197
|
-
) ->
|
191
|
+
execute: bool = False,
|
192
|
+
) -> int: ...
|
198
193
|
# endregion
|
199
194
|
# region min
|
200
|
-
@
|
195
|
+
@abstractmethod
|
201
196
|
def min[TProp](
|
202
197
|
self,
|
203
198
|
column: SelectCols[T, TProp],
|
204
199
|
alias: Optional[str] = ...,
|
205
|
-
execute: bool =
|
206
|
-
) ->
|
200
|
+
execute: bool = False,
|
201
|
+
) -> int: ...
|
207
202
|
# endregion
|
208
203
|
# region sum
|
209
|
-
@
|
204
|
+
@abstractmethod
|
210
205
|
def sum[TProp](
|
211
206
|
self,
|
212
207
|
column: SelectCols[T, TProp],
|
213
208
|
alias: Optional[str] = ...,
|
214
|
-
execute: bool =
|
215
|
-
) ->
|
209
|
+
execute: bool = False,
|
210
|
+
) -> int: ...
|
216
211
|
|
217
212
|
@overload
|
218
213
|
def join[FKTable](self, joins: TupleJoinType[FKTable] | tuple[*TupleJoinType[FKTable]]) -> JoinContext[tuple[*TupleJoinType[FKTable]]]: ...
|
@@ -10,10 +10,10 @@ from typing import (
|
|
10
10
|
import enum
|
11
11
|
|
12
12
|
|
13
|
-
from ormlambda.common.enums import JoinType
|
14
|
-
|
15
13
|
if TYPE_CHECKING:
|
14
|
+
from ormlambda.common.enums import JoinType
|
16
15
|
from ormlambda.sql.comparer import Comparer
|
16
|
+
from ormlambda.sql.types import ColumnType
|
17
17
|
|
18
18
|
type OrderTypes = Literal["ASC", "DESC"] | OrderType | Iterable[OrderType]
|
19
19
|
|
@@ -52,3 +52,6 @@ type WhereTypes[LTable, LProp, RTable, RProp] = Union[
|
|
52
52
|
tuple[Comparer[LTable, LProp, RTable, RProp], ...],
|
53
53
|
Callable[[LTable], WhereTypes[LTable, LProp, RTable, RProp]],
|
54
54
|
]
|
55
|
+
|
56
|
+
|
57
|
+
type SelectCols[T, TProp] = Callable[[T], ColumnType[TProp]] | ColumnType[TProp]
|
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.11.0 → ormlambda-3.11.1}/src/ormlambda/common/abstract_classes/decomposition_query.py
RENAMED
File without changes
|
{ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/abstract_classes/non_query_base.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
|
{ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/common/interfaces/IDecompositionQuery.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
|
{ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/types/__init__.py
RENAMED
File without changes
|
File without changes
|
{ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/types/datetime.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/caster/types/iterable.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
|
{ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/create_database.py
RENAMED
File without changes
|
File without changes
|
{ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/clauses/drop_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
|
{ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/databases/my_sql/repository/repository.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
|
{ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/repository/interfaces/IDatabaseConnection.py
RENAMED
File without changes
|
{ormlambda-3.11.0 → ormlambda-3.11.1}/src/ormlambda/repository/interfaces/IRepositoryBase.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
|