ormlambda 3.34.0__py3-none-any.whl → 3.34.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.
Files changed (53) hide show
  1. ormlambda/databases/__init__.py +4 -0
  2. ormlambda/databases/my_sql/__init__.py +3 -0
  3. ormlambda/{dialects/mysql → databases/my_sql}/caster/caster.py +5 -1
  4. ormlambda/{dialects/mysql → databases/my_sql}/caster/types/__init__.py +2 -0
  5. ormlambda/databases/my_sql/caster/types/date.py +34 -0
  6. ormlambda/databases/my_sql/caster/types/decimal.py +32 -0
  7. ormlambda/{dialects/mysql → databases/my_sql}/clauses/__init__.py +1 -0
  8. ormlambda/databases/my_sql/clauses/drop_table.py +26 -0
  9. ormlambda/{dialects/mysql/repository → databases/my_sql}/repository.py +5 -0
  10. ormlambda/dialects/mysql/__init__.py +3 -33
  11. ormlambda/dialects/mysql/base.py +1 -2
  12. ormlambda/engine/base.py +4 -23
  13. ormlambda/repository/interfaces/IRepositoryBase.py +7 -0
  14. ormlambda/sql/compiler.py +2 -243
  15. ormlambda/sql/ddl.py +4 -18
  16. ormlambda/sql/foreign_key.py +0 -18
  17. ormlambda/sql/table/table.py +9 -5
  18. ormlambda/statements/interfaces/IStatements.py +0 -3
  19. ormlambda/statements/statements.py +1 -7
  20. ormlambda/util/__init__.py +2 -1
  21. ormlambda/util/load_module.py +21 -0
  22. ormlambda/util/module_tree/dynamic_module.py +1 -1
  23. {ormlambda-3.34.0.dist-info → ormlambda-3.34.1.dist-info}/METADATA +2 -3
  24. {ormlambda-3.34.0.dist-info → ormlambda-3.34.1.dist-info}/RECORD +52 -47
  25. {ormlambda-3.34.0.dist-info → ormlambda-3.34.1.dist-info}/WHEEL +1 -1
  26. ormlambda/dialects/mysql/repository/__init__.py +0 -1
  27. /ormlambda/{dialects/mysql → databases/my_sql}/caster/__init__.py +0 -0
  28. /ormlambda/{dialects/mysql → databases/my_sql}/caster/types/boolean.py +0 -0
  29. /ormlambda/{dialects/mysql → databases/my_sql}/caster/types/bytes.py +0 -0
  30. /ormlambda/{dialects/mysql → databases/my_sql}/caster/types/datetime.py +0 -0
  31. /ormlambda/{dialects/mysql → databases/my_sql}/caster/types/float.py +0 -0
  32. /ormlambda/{dialects/mysql → databases/my_sql}/caster/types/int.py +0 -0
  33. /ormlambda/{dialects/mysql → databases/my_sql}/caster/types/iterable.py +0 -0
  34. /ormlambda/{dialects/mysql → databases/my_sql}/caster/types/none.py +0 -0
  35. /ormlambda/{dialects/mysql → databases/my_sql}/caster/types/point.py +0 -0
  36. /ormlambda/{dialects/mysql → databases/my_sql}/caster/types/string.py +0 -0
  37. /ormlambda/{dialects/mysql → databases/my_sql}/clauses/ST_AsText.py +0 -0
  38. /ormlambda/{dialects/mysql → databases/my_sql}/clauses/ST_Contains.py +0 -0
  39. /ormlambda/{dialects/mysql → databases/my_sql}/clauses/count.py +0 -0
  40. /ormlambda/{dialects/mysql → databases/my_sql}/clauses/delete.py +0 -0
  41. /ormlambda/{dialects/mysql → databases/my_sql}/clauses/group_by.py +0 -0
  42. /ormlambda/{dialects/mysql → databases/my_sql}/clauses/having.py +0 -0
  43. /ormlambda/{dialects/mysql → databases/my_sql}/clauses/insert.py +0 -0
  44. /ormlambda/{dialects/mysql → databases/my_sql}/clauses/joins.py +0 -0
  45. /ormlambda/{dialects/mysql → databases/my_sql}/clauses/limit.py +0 -0
  46. /ormlambda/{dialects/mysql → databases/my_sql}/clauses/offset.py +0 -0
  47. /ormlambda/{dialects/mysql → databases/my_sql}/clauses/order.py +0 -0
  48. /ormlambda/{dialects/mysql → databases/my_sql}/clauses/update.py +0 -0
  49. /ormlambda/{dialects/mysql → databases/my_sql}/clauses/upsert.py +0 -0
  50. /ormlambda/{dialects/mysql → databases/my_sql}/clauses/where.py +0 -0
  51. /ormlambda/{dialects/mysql/repository → databases/my_sql}/pool_types.py +0 -0
  52. {ormlambda-3.34.0.dist-info → ormlambda-3.34.1.dist-info}/AUTHORS +0 -0
  53. {ormlambda-3.34.0.dist-info → ormlambda-3.34.1.dist-info}/LICENSE +0 -0
@@ -0,0 +1,4 @@
1
+ from .my_sql import (
2
+ MySQLCaster as MySQLCaster,
3
+ MySQLRepository as MySQLRepository,
4
+ )
@@ -0,0 +1,3 @@
1
+ from mysql.connector import MySQLConnection # noqa: F401
2
+ from .repository import MySQLRepository # noqa: F401
3
+ from .caster import MySQLCaster # noqa: F401
@@ -12,11 +12,13 @@ from .types import (
12
12
  BytesCaster,
13
13
  IterableCaster,
14
14
  BooleanCaster,
15
+ DecimalCaster,
15
16
  )
16
17
 
17
18
  from shapely import Point
18
19
  from types import NoneType
19
- from datetime import datetime
20
+ from datetime import datetime, date
21
+ from decimal import Decimal
20
22
 
21
23
 
22
24
  class MySQLCaster(Caster):
@@ -31,9 +33,11 @@ class MySQLCaster(Caster):
31
33
  Point: PointCaster,
32
34
  NoneType: NoneTypeCaster,
33
35
  datetime: DatetimeCaster,
36
+ date: DatetimeCaster,
34
37
  bytes: BytesCaster,
35
38
  bytearray: BytesCaster,
36
39
  tuple: IterableCaster,
37
40
  list: IterableCaster,
38
41
  bool: BooleanCaster,
42
+ Decimal: DecimalCaster,
39
43
  }
@@ -7,3 +7,5 @@ from .datetime import DatetimeCaster as DatetimeCaster
7
7
  from .bytes import BytesCaster as BytesCaster
8
8
  from .iterable import IterableCaster as IterableCaster
9
9
  from .boolean import BooleanCaster as BooleanCaster
10
+ from .date import DateCaster as DateCaster
11
+ from .decimal import DecimalCaster as DecimalCaster
@@ -0,0 +1,34 @@
1
+ from typing import Optional
2
+ from ormlambda.caster import BaseCaster, Caster
3
+ from datetime import datetime
4
+ from .string import StringCaster
5
+
6
+
7
+ class DateCaster[TType](BaseCaster[datetime, TType]):
8
+ def __init__(self, value: datetime, type_value: TType):
9
+ super().__init__(value, type_value)
10
+
11
+ def wildcard_to_select(self, value: Optional[str] = None) -> str:
12
+ return Caster.PLACEHOLDER if value is None else value
13
+
14
+ def wildcard_to_where(self, value: Optional[str] = None) -> str:
15
+ return Caster.PLACEHOLDER if value is None else value
16
+
17
+ def wildcard_to_insert(self, value: Optional[str] = None) -> str:
18
+ return Caster.PLACEHOLDER if value is None else value
19
+
20
+ @property
21
+ @BaseCaster.return_value_if_exists
22
+ def to_database(self) -> Optional[datetime]:
23
+ return self.value
24
+
25
+ @property
26
+ @BaseCaster.return_value_if_exists
27
+ def from_database(self) -> Optional[datetime]:
28
+ return self.value
29
+
30
+ @property
31
+ @BaseCaster.return_value_if_exists
32
+ def string_data(self) -> Optional[str]:
33
+ datetime_string = self.value.strftime(r"%Y-%m-%d")
34
+ return StringCaster(datetime_string, str).string_data
@@ -0,0 +1,32 @@
1
+ from typing import Optional
2
+ from ormlambda.caster import BaseCaster, Caster
3
+ from decimal import Decimal
4
+
5
+
6
+ class DecimalCaster[TType](BaseCaster[Decimal, TType]):
7
+ def __init__(self, value: Decimal, type_value: TType):
8
+ super().__init__(value, type_value)
9
+
10
+ def wildcard_to_select(self, value: Optional[str] = None) -> str:
11
+ return Caster.PLACEHOLDER if value is None else value
12
+
13
+ def wildcard_to_where(self, value: Optional[str] = None) -> str:
14
+ return Caster.PLACEHOLDER if value is None else value
15
+
16
+ def wildcard_to_insert(self, value: Optional[str] = None) -> str:
17
+ return Caster.PLACEHOLDER if value is None else value
18
+
19
+ @property
20
+ @BaseCaster.return_value_if_exists
21
+ def to_database(self) -> Optional[Decimal]:
22
+ return Decimal(self.value)
23
+
24
+ @property
25
+ @BaseCaster.return_value_if_exists
26
+ def from_database(self) -> Optional[Decimal]:
27
+ return Decimal(self.value)
28
+
29
+ @property
30
+ @BaseCaster.return_value_if_exists
31
+ def string_data(self) -> Optional[str]:
32
+ return str(self.value)
@@ -1,4 +1,5 @@
1
1
  from .delete import DeleteQuery as Delete
2
+ from .drop_table import DropTable as DropTable
2
3
  from .insert import InsertQuery as Insert
3
4
  from .joins import JoinSelector as JoinSelector
4
5
  from .limit import Limit as Limit
@@ -0,0 +1,26 @@
1
+ from __future__ import annotations
2
+ from typing import Literal, override, TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from mysql.connector import MySQLConnection
6
+
7
+ from ormlambda.repository import BaseRepository
8
+
9
+
10
+ TypeExists = Literal["fail", "replace", "append"]
11
+
12
+
13
+ class DropTable:
14
+ def __init__(self, repository: BaseRepository[MySQLConnection]) -> None:
15
+ self._repository: BaseRepository[MySQLConnection] = repository
16
+
17
+ @override
18
+ def execute(self, name: str = None) -> None:
19
+ query = rf"{self.CLAUSE} {name}"
20
+ self._repository.execute(query)
21
+ return None
22
+
23
+ @property
24
+ @override
25
+ def CLAUSE(self) -> str:
26
+ return "DROP TABLE"
@@ -10,6 +10,7 @@ from mysql.connector.pooling import MySQLConnectionPool # noqa: F401
10
10
  from ormlambda.repository import BaseRepository
11
11
 
12
12
  # Custom libraries
13
+ from .clauses import DropTable
13
14
  from ormlambda.repository.response import Response
14
15
  from ormlambda.caster import Caster
15
16
 
@@ -166,6 +167,10 @@ class MySQLRepository(BaseRepository[MySQLConnectionPool]):
166
167
  cursor.execute(query)
167
168
  return None
168
169
 
170
+ @override
171
+ def drop_table(self, name: str) -> None:
172
+ return DropTable(self).execute(name)
173
+
169
174
  @override
170
175
  def database_exists(self, name: str) -> bool:
171
176
  temp_config = self._pool._cnx_config
@@ -1,38 +1,8 @@
1
1
  from . import base
2
2
  from . import mysqlconnector
3
3
 
4
- from .types import ( # noqa: F401
5
- NUMERIC,
6
- DECIMAL,
7
- DOUBLE,
8
- REAL,
9
- FLOAT,
10
- INTEGER,
11
- BIGINT,
12
- MEDIUMINT,
13
- TINYINT,
14
- SMALLINT,
15
- BIT,
16
- TIME,
17
- TIMESTAMP,
18
- DATETIME,
19
- YEAR,
20
- TEXT,
21
- TINYTEXT,
22
- MEDIUMTEXT,
23
- LONGTEXT,
24
- VARCHAR,
25
- CHAR,
26
- NVARCHAR,
27
- NCHAR,
28
- TINYBLOB,
29
- MEDIUMBLOB,
30
- LONGBLOB,
31
- )
32
-
33
-
34
- from .repository import MySQLRepository # noqa: F401
35
- from .caster import MySQLCaster # noqa: F401
36
-
37
4
  # default dialect
38
5
  base.dialect = dialect = mysqlconnector.dialect
6
+
7
+
8
+ from .types import * # noqa: F403
@@ -38,8 +38,7 @@ from .types import (
38
38
  )
39
39
  from ormlambda.sql.sqltypes import BLOB
40
40
 
41
- from .caster import MySQLCaster
42
- from .repository import MySQLRepository
41
+ from ormlambda.databases.my_sql import MySQLRepository, MySQLCaster
43
42
 
44
43
 
45
44
  if TYPE_CHECKING:
ormlambda/engine/base.py CHANGED
@@ -1,8 +1,8 @@
1
1
  from __future__ import annotations
2
- from pathlib import Path
3
- from typing import TYPE_CHECKING, BinaryIO, Literal, Optional, TextIO
2
+ from typing import TYPE_CHECKING, Literal
4
3
  from ormlambda.engine import url
5
- from ormlambda.sql.ddl import CreateSchema, DropSchema, CreateBackup
4
+ from ormlambda.sql.ddl import CreateSchema, DropSchema
5
+
6
6
 
7
7
  if TYPE_CHECKING:
8
8
  from ormlambda.dialects import Dialect
@@ -20,7 +20,7 @@ class Engine:
20
20
  if if_exists == "replace":
21
21
  self.drop_schema(schema_name, if_exists)
22
22
 
23
- sql = CreateSchema(schema=schema_name, if_not_exists=if_exists == "append").compile(self.dialect).string
23
+ sql = CreateSchema(schema=schema_name, if_not_exists=if_exists== 'append').compile(self.dialect).string
24
24
  try:
25
25
  self.repository.execute(sql)
26
26
  except Exception:
@@ -56,22 +56,3 @@ class Engine:
56
56
  def set_database(self, name: str) -> None:
57
57
  self.repository.database = name
58
58
  return None
59
-
60
- def create_backup(
61
- self,
62
- output: Optional[str | BinaryIO | TextIO] = None,
63
- compress: bool = False,
64
- backup_dir: str = "backups",
65
- **kw,
66
- ) -> Optional[str | BinaryIO | Path]:
67
- return (
68
- CreateBackup(self.url)
69
- .compile(
70
- self.dialect,
71
- output=output,
72
- compress=compress,
73
- backup_dir=backup_dir,
74
- **kw,
75
- )
76
- .string
77
- )
@@ -9,8 +9,12 @@ from typing import (
9
9
  Sequence,
10
10
  Type,
11
11
  Iterable,
12
+ TYPE_CHECKING,
12
13
  )
13
14
 
15
+ if TYPE_CHECKING:
16
+ from ormlambda.statements.types import TypeExists
17
+
14
18
 
15
19
  type _DBAPICursorDescription = Sequence[
16
20
  tuple[
@@ -138,6 +142,9 @@ class IRepositoryBase(ABC):
138
142
  @abstractmethod
139
143
  def execute(self, query: str) -> None: ...
140
144
 
145
+ @abstractmethod
146
+ def drop_table(self, name: str) -> None: ...
147
+
141
148
  @abstractmethod
142
149
  def table_exists(self, name: str) -> bool: ...
143
150
 
ormlambda/sql/compiler.py CHANGED
@@ -1,13 +1,6 @@
1
1
  from __future__ import annotations
2
2
  import abc
3
- import datetime
4
- import io
5
- import logging
6
- import os
7
- from pathlib import Path
8
- import subprocess
9
- import sys
10
- from typing import Any, BinaryIO, ClassVar, Optional, TYPE_CHECKING, TextIO, Union
3
+ from typing import Any, ClassVar, Optional, TYPE_CHECKING
11
4
 
12
5
  from ormlambda.sql.ddl import CreateColumn
13
6
  from ormlambda.sql.foreign_key import ForeignKey
@@ -22,13 +15,7 @@ if TYPE_CHECKING:
22
15
  from .visitors import Element
23
16
  from .elements import ClauseElement
24
17
  from ormlambda.dialects import Dialect
25
- from ormlambda.sql.ddl import (
26
- CreateTable,
27
- CreateSchema,
28
- DropSchema,
29
- DropTable,
30
- CreateBackup,
31
- )
18
+ from ormlambda.sql.ddl import CreateTable, CreateSchema, DropSchema
32
19
  from .sqltypes import (
33
20
  INTEGER,
34
21
  SMALLINTEGER,
@@ -75,12 +62,6 @@ if TYPE_CHECKING:
75
62
  )
76
63
 
77
64
 
78
- type customString = Union[str | Path]
79
-
80
- logging.basicConfig(stream=sys.stdout, level=logging.INFO)
81
- log = logging.getLogger(__name__)
82
-
83
-
84
65
  class Compiled:
85
66
  """Represent a compiled SQL or DDL expression.
86
67
 
@@ -268,9 +249,6 @@ class DDLCompiler(Compiled):
268
249
  sql += f"\n){table_options};"
269
250
  return sql
270
251
 
271
- def visit_drop_table(self, drop: DropTable, **kw) -> str:
272
- return "DROP TABLE " + drop.element.__table_name__
273
-
274
252
  def visit_create_column(self, create: CreateColumn, first_pk=False, **kw): # noqa: F821
275
253
  column = create.element
276
254
  return self.get_column_specification(column)
@@ -295,225 +273,6 @@ class DDLCompiler(Compiled):
295
273
  return None
296
274
  return None
297
275
 
298
- #TODOH []: refactor in order to improve clarity
299
- def visit_create_backup(
300
- self,
301
- backup: CreateBackup,
302
- output: Optional[Union[Path | str, BinaryIO, TextIO]] = None,
303
- compress: bool = False,
304
- backup_dir: customString = ".",
305
- **kw,
306
- ) -> Optional[str | BinaryIO | Path]:
307
- """
308
- Create MySQL backup with flexible output options
309
-
310
- Args:
311
- backup: An object containing database connection details (host, user, password, database, port).
312
- output: Output destination:
313
- - None: Auto-generate file path
314
- - str: Custom file path (treated as a path-like object)
315
- - Stream object: Write to stream (io.StringIO, io.BytesIO, sys.stdout, etc.)
316
- compress: Whether to compress the output using gzip.
317
- backup_dir: Directory for auto-generated files if 'output' is None.
318
-
319
- Returns:
320
- - File path (str) if output to file.
321
- - Backup data as bytes (if output to binary stream) or string (if output to text stream).
322
- - None if an error occurs.
323
- """
324
-
325
- host = backup.url.host
326
- user = backup.url.username
327
- password = backup.url.password
328
- database = backup.url.database
329
- port = backup.url.port
330
-
331
- if not database:
332
- log.error("Error: Database name is required for backup.")
333
- return None
334
-
335
- # Build mysqldump command
336
- command = [
337
- "mysqldump",
338
- f"--host={host}",
339
- f"--port={port}",
340
- f"--user={user}",
341
- f"--password={password}",
342
- "--single-transaction",
343
- "--routines",
344
- "--triggers",
345
- "--events",
346
- "--lock-tables=false", # Often used to avoid locking during backup
347
- "--add-drop-table",
348
- "--extended-insert",
349
- database,
350
- ]
351
-
352
- def export_to_stream_internal() -> Optional[io.BytesIO]:
353
- nonlocal command, compress, database
354
- # If streaming, execute mysqldump and capture stdout
355
- log.info(f"Backing up database '{database}' to BytesIO...")
356
-
357
- try:
358
- if compress:
359
- # Start mysqldump process
360
- mysqldump_process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
361
-
362
- # Start gzip process, taking input from mysqldump
363
- gzip_process = subprocess.Popen(["gzip", "-c"], stdin=mysqldump_process.stdout, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
364
-
365
- # Close mysqldump stdout in parent process - gzip will handle it
366
- mysqldump_process.stdout.close()
367
-
368
- # Wait for gzip to complete (which will also wait for mysqldump)
369
- gzip_stdout, gzip_stderr = gzip_process.communicate()
370
-
371
- # Wait for mysqldump to finish and get its stderr
372
- mysqldump_stderr = mysqldump_process.communicate()[1]
373
-
374
- if mysqldump_process.returncode != 0:
375
- log.error(f"mysqldump error: {mysqldump_stderr.decode().strip()}")
376
- return None
377
- if gzip_process.returncode != 0:
378
- log.error(f"gzip error: {gzip_stderr.decode().strip()}")
379
- return None
380
-
381
- log.info("Backup successful and compressed to BytesIO.")
382
- return io.BytesIO(gzip_stdout)
383
- else:
384
- # Directly capture mysqldump output
385
- process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
386
- stdout, stderr = process.communicate()
387
-
388
- if process.returncode != 0:
389
- log.error(f"mysqldump error: {stderr.decode().strip()}")
390
- return None
391
-
392
- log.info("Backup successful to BytesIO.")
393
- return io.BytesIO(stdout)
394
-
395
- except FileNotFoundError as e:
396
- log.error(f"Error: '{e.filename}' command not found. Please ensure mysqldump (and gzip if compressing) is installed and in your system's PATH.")
397
- return None
398
- except Exception as e:
399
- log.error(f"An unexpected error occurred during streaming backup: {e}")
400
- return None
401
-
402
- def export_to_file_internal(file_path: customString) -> Optional[Path]:
403
- nonlocal command, compress, database
404
-
405
- if isinstance(file_path, str):
406
- file_path = Path(file_path)
407
-
408
- if not file_path.exists():
409
- file_path.parent.mkdir(parents=True, exist_ok=True)
410
- file_path.touch()
411
-
412
- try:
413
- if compress:
414
- # Pipe mysqldump output through gzip to file
415
- with open(file_path, "wb") as output_file:
416
- # Start mysqldump process
417
- mysqldump_process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
418
-
419
- # Start gzip process, taking input from mysqldump and writing to file
420
- gzip_process = subprocess.Popen(["gzip", "-c"], stdin=mysqldump_process.stdout, stdout=output_file, stderr=subprocess.PIPE)
421
-
422
- # Close mysqldump stdout in parent process - gzip will handle it
423
- mysqldump_process.stdout.close()
424
-
425
- # Wait for gzip to complete (which will also wait for mysqldump)
426
- gzip_stdout, gzip_stderr = gzip_process.communicate()
427
-
428
- # Wait for mysqldump to finish and get its stderr
429
- mysqldump_stderr = mysqldump_process.communicate()[1]
430
-
431
- if mysqldump_process.returncode != 0:
432
- log.error(f"mysqldump error: {mysqldump_stderr.decode().strip()}")
433
- return None
434
- if gzip_process.returncode != 0:
435
- log.error(f"gzip error: {gzip_stderr.decode().strip()}")
436
- return None
437
- else:
438
- # Directly redirect mysqldump output to file
439
- with open(file_path, "wb") as output_file:
440
- process = subprocess.Popen(command, stdout=output_file, stderr=subprocess.PIPE)
441
- stdout, stderr = process.communicate()
442
-
443
- if process.returncode != 0:
444
- log.error(f"mysqldump error: {stderr.decode().strip()}")
445
- return None
446
-
447
- log.info(f"Backup completed successfully: {file_path}")
448
- return file_path
449
-
450
- except FileNotFoundError as e:
451
- log.error(f"Error: '{e.filename}' command not found. Please ensure mysqldump (and gzip if compressing) is installed and in your system's PATH.")
452
- return None
453
- except Exception as e:
454
- log.error(f"An unexpected error occurred during file backup: {e}")
455
- return None
456
-
457
- try:
458
- if output is None:
459
- # Auto-generate file path
460
-
461
- backup_dir = Path(backup_dir)
462
- backup_dir.mkdir(exist_ok=True)
463
-
464
- timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
465
- file_extension = "sql.gz" if compress else "sql"
466
- output_filename = f"{database}_backup_{timestamp}.{file_extension}"
467
- output_filepath = os.path.join(backup_dir, output_filename)
468
- return export_to_file_internal(output_filepath)
469
-
470
- elif isinstance(output, (io.BytesIO, io.StringIO)):
471
- # Output to a stream object
472
- stream_result = export_to_stream_internal()
473
- if stream_result:
474
- # Write the content from the internal BytesIO to the provided output stream
475
- if isinstance(output, io.BytesIO):
476
- output.write(stream_result.getvalue())
477
- return stream_result.getvalue() # Return bytes if it was a BytesIO internally
478
- elif isinstance(output, io.StringIO):
479
- # Attempt to decode bytes to string if target is StringIO
480
- try:
481
- decoded_content = stream_result.getvalue().decode("utf-8")
482
- output.write(decoded_content)
483
- return decoded_content
484
- except UnicodeDecodeError:
485
- log.error("Error: Cannot decode byte stream to UTF-8 for StringIO output. Consider setting compress=False or ensuring database encoding is compatible.")
486
- return None
487
- return None
488
-
489
- elif isinstance(output, str | Path):
490
- # Output to a custom file path
491
- return export_to_file_internal(output)
492
-
493
- elif isinstance(output, (BinaryIO, TextIO)): # Handles sys.stdout, open file objects
494
- stream_result = export_to_stream_internal()
495
- if stream_result:
496
- if "b" in getattr(output, "mode", "") or isinstance(output, BinaryIO): # Check if it's a binary stream
497
- output.write(stream_result.getvalue())
498
- return stream_result.getvalue()
499
- else: # Assume text stream
500
- try:
501
- decoded_content = stream_result.getvalue().decode("utf-8")
502
- output.write(decoded_content)
503
- return decoded_content
504
- except UnicodeDecodeError:
505
- log.error("Error: Cannot decode byte stream to UTF-8 for text stream output. Consider setting compress=False or ensuring database encoding is compatible.")
506
- return None
507
- return None
508
-
509
- else:
510
- log.error(f"Unsupported output type: {type(output)}")
511
- return None
512
-
513
- except Exception as e:
514
- log.error(f"An unexpected error occurred: {e}")
515
- return None
516
-
517
276
 
518
277
  class GenericTypeCompiler(TypeCompiler):
519
278
  """Generic type compiler
ormlambda/sql/ddl.py CHANGED
@@ -3,7 +3,6 @@ from typing import TYPE_CHECKING
3
3
  from .elements import ClauseElement
4
4
 
5
5
  if TYPE_CHECKING:
6
- from ormlambda import URL
7
6
  from ormlambda.dialects.interface.dialect import Dialect
8
7
  from ormlambda import Column
9
8
  from ormlambda import Table
@@ -23,22 +22,16 @@ class BaseDDLElement(ClauseElement):
23
22
  return dialect.ddl_compiler(dialect, self, **kw)
24
23
 
25
24
 
26
- class CreateDropTable:
27
- def __init__(self, element: Table):
28
- self.element = element
29
- self.columns = [CreateColumn(c) for c in element.get_columns()]
30
-
31
-
32
- class CreateTable(CreateDropTable, BaseDDLElement):
25
+ class CreateTable(BaseDDLElement):
33
26
  """
34
27
  Class representing a CREATE TABLE statement.
35
28
  """
36
29
 
37
30
  __visit_name__ = "create_table"
38
31
 
39
-
40
- class DropTable(CreateDropTable, BaseDDLElement):
41
- __visit_name__ = "drop_table"
32
+ def __init__(self, element: Table):
33
+ self.element = element
34
+ self.columns = [CreateColumn(c) for c in element.get_columns()]
42
35
 
43
36
 
44
37
  class CreateColumn[T](BaseDDLElement):
@@ -73,10 +66,3 @@ class SchemaExists(BaseDDLElement):
73
66
 
74
67
  def __init__(self, schema: str):
75
68
  self.schema = schema
76
-
77
-
78
- class CreateBackup(BaseDDLElement):
79
- __visit_name__ = "create_backup"
80
-
81
- def __init__(self, url: URL):
82
- self.url = url
@@ -36,14 +36,6 @@ class ForeignKeyContext(set["ForeignKey"]):
36
36
  class ForeignKey[TLeft: Table, TRight: Table](Element, IQuery):
37
37
  __visit_name__ = "foreign_key"
38
38
 
39
- __slots__ = (
40
- "_tright",
41
- "_relationship",
42
- "_comparer",
43
- "_clause_name",
44
- "_keep_alive",
45
- )
46
-
47
39
  stored_calls: ClassVar[ForeignKeyContext] = ForeignKeyContext()
48
40
 
49
41
  @overload
@@ -157,13 +149,3 @@ class ForeignKey[TLeft: Table, TRight: Table](Element, IQuery):
157
149
  comparer.set_context(context)
158
150
  comparer._dialect = dialect
159
151
  return comparer
160
-
161
- def __hash__(self):
162
- return hash((
163
- self._tleft,
164
- self._tright,
165
- self._clause_name,
166
- ))
167
-
168
- def __eq__(self, other: ForeignKey):
169
- return hash(other) == hash(self)
@@ -5,9 +5,10 @@ import json
5
5
  from ormlambda.sql import Column
6
6
  from ormlambda.sql import ForeignKey
7
7
  from ormlambda.util.module_tree.dfs_traversal import DFSTraversal
8
- from ormlambda.sql.ddl import CreateTable, DropTable
8
+ from ormlambda.sql.ddl import CreateTable
9
9
 
10
10
  if TYPE_CHECKING:
11
+ from ormlambda.statements import BaseStatement
11
12
  from ormlambda.dialects import Dialect
12
13
 
13
14
  from .table_constructor import __init_constructor__
@@ -114,14 +115,17 @@ class Table(metaclass=TableMeta):
114
115
  if name == key:
115
116
  return value
116
117
 
118
+ @classmethod
119
+ def create_table_query(cls, statement: BaseStatement) -> str:
120
+ """It's classmethod because of it does not matter the columns values to create the table"""
121
+ from ormlambda.sql.schema_generator import SchemaGeneratorFactory
122
+
123
+ return SchemaGeneratorFactory.get_generator(statement._dialect).create_table(cls)
124
+
117
125
  @classmethod
118
126
  def create_table(cls, dialect: Dialect) -> str:
119
127
  return CreateTable(cls).compile(dialect).string
120
128
 
121
- @classmethod
122
- def drop_table(cls, dialect:Dialect)->str:
123
- return DropTable(cls).compile(dialect).string
124
-
125
129
  @classmethod
126
130
  def find_dependent_tables(cls) -> tuple["Table", ...]:
127
131
  """Work in progress"""
@@ -37,9 +37,6 @@ class IStatements[T: Table](Element):
37
37
  @abstractmethod
38
38
  def create_table(self, if_exists: TypeExists = "fail") -> None: ...
39
39
 
40
- @abstractmethod
41
- def drop_table(self) -> None: ...
42
-
43
40
  # #TODOL [ ]: We must to implement this mehtod
44
41
  # @abstractmethod
45
42
  # def drop_table(self)->None: ...
@@ -56,7 +56,7 @@ class Statements[T: Table, TRepo](BaseStatement[T, None]):
56
56
  name: str = self._model.__table_name__
57
57
  if self._repository.table_exists(name):
58
58
  if if_exists == "replace":
59
- self.drop_table()
59
+ self._repository.drop_table(name)
60
60
 
61
61
  elif if_exists == "fail":
62
62
  raise ValueError(f"Table '{self._model.__table_name__}' already exists")
@@ -77,12 +77,6 @@ class Statements[T: Table, TRepo](BaseStatement[T, None]):
77
77
  self._repository.execute(query)
78
78
  return None
79
79
 
80
- @override
81
- def drop_table(self)->None:
82
- q = self.model.drop_table(self.dialect)
83
- self._repository.execute(q)
84
- return None
85
-
86
80
  @override
87
81
  @clear_list
88
82
  def insert(self, instances: T | list[T]) -> None:
@@ -1,7 +1,8 @@
1
1
  from .module_tree import ModuleTree # noqa: F401
2
+ from .load_module import __load_module__ # noqa: F401
2
3
  import types
3
4
  import inspect
4
- from typing import Any, Literal, Optional, overload, get_origin, TypeGuard, TypeAliasType
5
+ from typing import Any, Literal, Optional, Sequence, overload, get_origin, TypeGuard, TypeAliasType
5
6
  from ormlambda.util.typing import LITERAL_TYPES, _AnnotationScanType
6
7
  from .plugin_loader import PluginLoader # noqa: F401
7
8
 
@@ -0,0 +1,21 @@
1
+ import logging
2
+ import importlib
3
+ from typing import Any, Optional
4
+
5
+ log = logging.getLogger(__name__)
6
+
7
+
8
+ def __load_module__(module_path: str, dialect_name: Optional[str] = None) -> Optional[Any]:
9
+ """
10
+ Load a module by its path and return the module object.
11
+ Returns None if the module cannot be imported
12
+ Args:
13
+ module_path: The dot-separated path to the module
14
+
15
+ Returns:
16
+ The loaded module or None if import fails
17
+ """
18
+ try:
19
+ return importlib.import_module(module_path)
20
+ except ImportError:
21
+ log.error(f"{module_path.split('.')[-1] if not dialect_name else dialect_name} dialect not available")
@@ -236,7 +236,7 @@ class ModuleTree:
236
236
  # we need to ensure that the object we going to add in table_list is the same
237
237
  for name, obj in table_class:
238
238
  if name == node.class_name:
239
- table_list.append(obj.create_table())
239
+ table_list.append(obj.create_table_query())
240
240
  return tuple(table_list)
241
241
 
242
242
  @staticmethod
@@ -1,13 +1,12 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.1
2
2
  Name: ormlambda
3
- Version: 3.34.0
3
+ Version: 3.34.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
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
11
10
  Requires-Dist: mysql-connector-python (>=9.0.0,<10.0.0)
12
11
  Requires-Dist: shapely (>=2.0.6,<3.0.0)
13
12
  Description-Content-Type: text/markdown
@@ -21,50 +21,54 @@ ormlambda/common/interfaces/IJoinSelector.py,sha256=-w-MJmwq65tpDLtigWSLgvAqeOl7
21
21
  ormlambda/common/interfaces/INonQueryCommand.py,sha256=7CjLW4sKqkR5zUIGvhRXOtzTs6vypJW1a9EJHlgCw2c,260
22
22
  ormlambda/common/interfaces/IQueryCommand.py,sha256=13vm_adVZ51BumMnNPHrqhzdC1pQVfZEVb6pkZgK-EU,475
23
23
  ormlambda/common/interfaces/__init__.py,sha256=np5wuAnBVAHDyD01-X3M9qPmzbjOzP6KNAj9BFazGd4,300
24
+ ormlambda/databases/__init__.py,sha256=uMUnB19I5qlpjLkepLpNhk9L3--fijXmHNMledQWj5w,96
25
+ ormlambda/databases/my_sql/__init__.py,sha256=nDSgvRuifTJ8FXcgdOrEguYnv-VBFyCOKrQWr0RHCiY,158
26
+ ormlambda/databases/my_sql/caster/__init__.py,sha256=Df2sdZaAJ1Mi5Ego0sILMk5pF1NbK-nlV0hbpzd0PWE,47
27
+ ormlambda/databases/my_sql/caster/caster.py,sha256=h72gWNjwZ0z3nguMz1fDybN8qLhPm_vTYhZ0zUSdBPc,977
28
+ ormlambda/databases/my_sql/caster/types/__init__.py,sha256=m4YBCgQTugiUPiqIYrnEs5WUTAzQ2L9vSxVxAanHKIs,543
29
+ ormlambda/databases/my_sql/caster/types/boolean.py,sha256=EYOxnR7-XU30UYZbBbMH4pyynTw5CPU1G8V5xpCthg4,1100
30
+ ormlambda/databases/my_sql/caster/types/bytes.py,sha256=Mzl5oI2q6hGL9TFrTS-Ae1olQlAVtvNoxTSLUSBb5v8,1026
31
+ ormlambda/databases/my_sql/caster/types/date.py,sha256=8usP1Af7WUzEC8BHOBL16Zjg9j-ipMlb42p0UTFELmg,1176
32
+ ormlambda/databases/my_sql/caster/types/datetime.py,sha256=ISzcsbwijTa2wC9ZD8zy5piRm9BdnT9GxkMNf4FQYug,1189
33
+ ormlambda/databases/my_sql/caster/types/decimal.py,sha256=ycQnSqO-aFkrcsa8JKVPdnfjotNL_BUFeScYRcueOWM,1068
34
+ ormlambda/databases/my_sql/caster/types/float.py,sha256=EbU6J3yoL5_naLowfibkfUC9Bk9WzDaWks7lJ2pNhyA,1026
35
+ ormlambda/databases/my_sql/caster/types/int.py,sha256=a30xbe0LNj2BvbtLNZhUXFvT3WJ115MFsHC19Y3NLTk,1016
36
+ ormlambda/databases/my_sql/caster/types/iterable.py,sha256=nFPMOiaahzw_HWSdMZLRDQVim0aWUMoP-OLvp7vONC4,1029
37
+ ormlambda/databases/my_sql/caster/types/none.py,sha256=Bl4jpVVyoLG7ehoCAYj9lFBZbRWbyDN8QsQeWmIb84I,948
38
+ ormlambda/databases/my_sql/caster/types/point.py,sha256=GHAf51kE0AS7wOlCYM9YW-z2ZbmY8hXwcHs979ZCeaY,1442
39
+ ormlambda/databases/my_sql/caster/types/string.py,sha256=WFjTC5phuJ_-ShuokndFbqGuFgGZZx9GbpozH4rlB2g,1017
40
+ ormlambda/databases/my_sql/clauses/ST_AsText.py,sha256=YrBf-cbkyjI_335IaOZ1LC-vgh1y3PqVOcBTrKj95Hs,1278
41
+ ormlambda/databases/my_sql/clauses/ST_Contains.py,sha256=xzIWxJftryVoQCKUmV7TtGDkFAzUFhINXxLcWhuwac4,1189
42
+ ormlambda/databases/my_sql/clauses/__init__.py,sha256=GXl_sqgKLHaLQYqbsuKlaV7SwLZK8oF-MXd4zAIr2LU,555
43
+ ormlambda/databases/my_sql/clauses/count.py,sha256=sY2c5KlLT724DODLnJOjZZe14RdfoZvf1z3MjVVwAT4,1032
44
+ ormlambda/databases/my_sql/clauses/delete.py,sha256=v38-Mq32uE5LRXzD0gME5MFtw2QK5qwxacv_B69wLeE,336
45
+ ormlambda/databases/my_sql/clauses/drop_table.py,sha256=vPEE7N7z-N0vfVp0t-Qee1TBdZ9Fkvp_rvPP8LAcvdc,673
46
+ ormlambda/databases/my_sql/clauses/group_by.py,sha256=tYFIlcY5gTi1qcPrCtkbwSJeEZ7gF6DJ8puf6sdgyaE,402
47
+ ormlambda/databases/my_sql/clauses/having.py,sha256=GTgjS_KJ4umxB2wgt533cfFn8T0Dx7GvMgJL3cHXIAs,342
48
+ ormlambda/databases/my_sql/clauses/insert.py,sha256=RYQh8lgAl-Aua-xQneVmn310ouJSAU7F4EJJ5VxuyX4,294
49
+ ormlambda/databases/my_sql/clauses/joins.py,sha256=0GUd1YMPaZdboqGOPSM1sCFBKPO7DQOG5K5mzeTSeBw,448
50
+ ormlambda/databases/my_sql/clauses/limit.py,sha256=uIV54zFLlkthaxBFp-qKGfWkKooeWdrHvuRhVlj0qiw,127
51
+ ormlambda/databases/my_sql/clauses/offset.py,sha256=Fffxmya1B70cjjOTqk9RjoVZHnyFfgjBb8KdLPPL0MM,130
52
+ ormlambda/databases/my_sql/clauses/order.py,sha256=lD08cc9_jQSYKJppp_NQqMira9t1FXfmeGBYlPpCrUU,210
53
+ ormlambda/databases/my_sql/clauses/update.py,sha256=up0zRl8hhVbQHzkgiHaO3V6DlbU0ystTue-xmE3WV7o,234
54
+ ormlambda/databases/my_sql/clauses/upsert.py,sha256=xEvdGdQVUu6so_CQKdqLMwIo_B-gm3dGRD2bWsV8N6s,238
55
+ ormlambda/databases/my_sql/clauses/where.py,sha256=JCqKfMCt_tiUXtLa-DW0y6_IyNqIxLC6-iju_94oeBA,242
56
+ ormlambda/databases/my_sql/pool_types.py,sha256=6c7LMS1VGR8ko1LB1T8DQzn1l10Mzk8PfIeYEOb9w30,1839
57
+ ormlambda/databases/my_sql/repository.py,sha256=rmJXu49Absd_ULACxxM-B79TAqwRLdpV4VC0zF_Hw2Q,7203
24
58
  ormlambda/dialects/__init__.py,sha256=srorTnQfbyn7meJej4rJPR5xwnxwlbhPXl6jJ8ocUIA,865
25
59
  ormlambda/dialects/default/__init__.py,sha256=N1B0LKEDu7r2-mTF9mBA4ReyhYeDuJDnbQCiH4hJvFQ,33
26
60
  ormlambda/dialects/default/base.py,sha256=rmK-nV5luN2lphSgisM8TBy3s4JXVgvZa79ATHeVOuU,1088
27
61
  ormlambda/dialects/interface/__init__.py,sha256=IbB5o6ae7XNVVfNt4uqZRZcVK9HHG6eLLK_E0J99kwY,43
28
62
  ormlambda/dialects/interface/dialect.py,sha256=z47GXCi-uJ6Oq7Zm64OHM0q61T3xWCss-uGdcuuXng0,2810
29
- ormlambda/dialects/mysql/__init__.py,sha256=_rQVMxQHYOBHw0qjAw4XZUuhQ1fw63fmON4HSbS4-po,585
30
- ormlambda/dialects/mysql/base.py,sha256=HVu42IdA63sY5yh7U8NQFnddllXvw02yfscmZVEUJsg,11692
31
- ormlambda/dialects/mysql/caster/__init__.py,sha256=Df2sdZaAJ1Mi5Ego0sILMk5pF1NbK-nlV0hbpzd0PWE,47
32
- ormlambda/dialects/mysql/caster/caster.py,sha256=kuGp3Kq5sFsUylGdqX5BOFWxxZdXoO_iyGk1PYy2Beo,854
33
- ormlambda/dialects/mysql/caster/types/__init__.py,sha256=nE2bHykuvxTu49nzZ48_PbVe6J62pbWunHBJT2mfoM8,448
34
- ormlambda/dialects/mysql/caster/types/boolean.py,sha256=EYOxnR7-XU30UYZbBbMH4pyynTw5CPU1G8V5xpCthg4,1100
35
- ormlambda/dialects/mysql/caster/types/bytes.py,sha256=Mzl5oI2q6hGL9TFrTS-Ae1olQlAVtvNoxTSLUSBb5v8,1026
36
- ormlambda/dialects/mysql/caster/types/datetime.py,sha256=ISzcsbwijTa2wC9ZD8zy5piRm9BdnT9GxkMNf4FQYug,1189
37
- ormlambda/dialects/mysql/caster/types/float.py,sha256=EbU6J3yoL5_naLowfibkfUC9Bk9WzDaWks7lJ2pNhyA,1026
38
- ormlambda/dialects/mysql/caster/types/int.py,sha256=a30xbe0LNj2BvbtLNZhUXFvT3WJ115MFsHC19Y3NLTk,1016
39
- ormlambda/dialects/mysql/caster/types/iterable.py,sha256=nFPMOiaahzw_HWSdMZLRDQVim0aWUMoP-OLvp7vONC4,1029
40
- ormlambda/dialects/mysql/caster/types/none.py,sha256=Bl4jpVVyoLG7ehoCAYj9lFBZbRWbyDN8QsQeWmIb84I,948
41
- ormlambda/dialects/mysql/caster/types/point.py,sha256=GHAf51kE0AS7wOlCYM9YW-z2ZbmY8hXwcHs979ZCeaY,1442
42
- ormlambda/dialects/mysql/caster/types/string.py,sha256=WFjTC5phuJ_-ShuokndFbqGuFgGZZx9GbpozH4rlB2g,1017
43
- ormlambda/dialects/mysql/clauses/ST_AsText.py,sha256=YrBf-cbkyjI_335IaOZ1LC-vgh1y3PqVOcBTrKj95Hs,1278
44
- ormlambda/dialects/mysql/clauses/ST_Contains.py,sha256=xzIWxJftryVoQCKUmV7TtGDkFAzUFhINXxLcWhuwac4,1189
45
- ormlambda/dialects/mysql/clauses/__init__.py,sha256=z9PcBxAATLm5fbl6S6_mTRC58zhA1JL9W4Ftliv4mRc,508
46
- ormlambda/dialects/mysql/clauses/count.py,sha256=sY2c5KlLT724DODLnJOjZZe14RdfoZvf1z3MjVVwAT4,1032
47
- ormlambda/dialects/mysql/clauses/delete.py,sha256=v38-Mq32uE5LRXzD0gME5MFtw2QK5qwxacv_B69wLeE,336
48
- ormlambda/dialects/mysql/clauses/group_by.py,sha256=tYFIlcY5gTi1qcPrCtkbwSJeEZ7gF6DJ8puf6sdgyaE,402
49
- ormlambda/dialects/mysql/clauses/having.py,sha256=GTgjS_KJ4umxB2wgt533cfFn8T0Dx7GvMgJL3cHXIAs,342
50
- ormlambda/dialects/mysql/clauses/insert.py,sha256=RYQh8lgAl-Aua-xQneVmn310ouJSAU7F4EJJ5VxuyX4,294
51
- ormlambda/dialects/mysql/clauses/joins.py,sha256=0GUd1YMPaZdboqGOPSM1sCFBKPO7DQOG5K5mzeTSeBw,448
52
- ormlambda/dialects/mysql/clauses/limit.py,sha256=uIV54zFLlkthaxBFp-qKGfWkKooeWdrHvuRhVlj0qiw,127
53
- ormlambda/dialects/mysql/clauses/offset.py,sha256=Fffxmya1B70cjjOTqk9RjoVZHnyFfgjBb8KdLPPL0MM,130
54
- ormlambda/dialects/mysql/clauses/order.py,sha256=lD08cc9_jQSYKJppp_NQqMira9t1FXfmeGBYlPpCrUU,210
55
- ormlambda/dialects/mysql/clauses/update.py,sha256=up0zRl8hhVbQHzkgiHaO3V6DlbU0ystTue-xmE3WV7o,234
56
- ormlambda/dialects/mysql/clauses/upsert.py,sha256=xEvdGdQVUu6so_CQKdqLMwIo_B-gm3dGRD2bWsV8N6s,238
57
- ormlambda/dialects/mysql/clauses/where.py,sha256=JCqKfMCt_tiUXtLa-DW0y6_IyNqIxLC6-iju_94oeBA,242
63
+ ormlambda/dialects/mysql/__init__.py,sha256=y4gh32agzxxpjuC6x3oKEuCJYBwMYYuvJ-xxBS1rbv4,152
64
+ ormlambda/dialects/mysql/base.py,sha256=ocDJprw5PFhZ9vsrrUJdBoqjwRwa3V163wK1p7j-gpc,11688
58
65
  ormlambda/dialects/mysql/mysqlconnector.py,sha256=DOjK7U7LOhjuVQJULzAV8xaRGX0OlBU8APUeRiTcbDY,1378
59
- ormlambda/dialects/mysql/repository/__init__.py,sha256=DVXF2zWiG1WvHRRdXcxcHg2PSAioaS2P6Qlwx6xpRuE,39
60
- ormlambda/dialects/mysql/repository/pool_types.py,sha256=6c7LMS1VGR8ko1LB1T8DQzn1l10Mzk8PfIeYEOb9w30,1839
61
- ormlambda/dialects/mysql/repository/repository.py,sha256=-LwEWRvyq6_DDmWD2sWiH9x12x0RUDmH94ZID1Xyvac,7067
62
66
  ormlambda/dialects/mysql/types.py,sha256=lOhdi442saxQJlQ_jgChBETE0fFMGTQLWN0a76R4fkc,23453
63
67
  ormlambda/dialects/sqlite/__init__.py,sha256=2EMmxD7ORtGoD18GJ_9aC_tPutAq9ormMZJmaJ5nkYA,103
64
68
  ormlambda/dialects/sqlite/base.py,sha256=24LSB461yQDEnXa-TsQt_srJmBCAR6M6419pa40CL_4,1503
65
69
  ormlambda/dialects/sqlite/pysqlite.py,sha256=dZY0NV2IvSTk3DNEDyncstmIABKj3M2xfmhf2dc2zQs,680
66
70
  ormlambda/engine/__init__.py,sha256=JpCLfuW1zcJi4ki97ajXh0aQxMSvWBKzDlBZx9ZVF9o,132
67
- ormlambda/engine/base.py,sha256=P63f6N471slfvfrYyLInhzN-Sqs1RJJns-MQbnrrpf4,2548
71
+ ormlambda/engine/base.py,sha256=i_q9-na1oPPrkAcQHBp3RvmaplueZlkPPaUM9_kuDWM,1985
68
72
  ormlambda/engine/create.py,sha256=caDYXX4BP5uODSrdJXRZvWWjbliDgH1TiSvhtHP3RNY,533
69
73
  ormlambda/engine/url.py,sha256=ZzdgZU_Cnjhonbbr5OfBvq_ThUPnDj9v-3-7O54ENm0,26137
70
74
  ormlambda/engine/utils.py,sha256=fFoiKsiFuLcjcBVYNebVoYnMrEj3aZdoxEVSNfCY-GM,522
@@ -75,7 +79,7 @@ ormlambda/model/base_model.py,sha256=kgobamJ4GHmDEU-g2YTVIPTXPJFnNK3rsQOm2rXq4kU
75
79
  ormlambda/repository/__init__.py,sha256=4KAhKn6vWV7bslewvGMNqbbbUnz1DLnH4yy-M5QNAQA,112
76
80
  ormlambda/repository/base_repository.py,sha256=CzHU-yUCycMqTp8RFI0mj2hS2RgC9INu3X20HsgyEKA,1270
77
81
  ormlambda/repository/interfaces/IDatabaseConnection.py,sha256=pxczjx0b53yjjg5hvVDloMgUTFDahVC3HlJLQjo9_1w,283
78
- ormlambda/repository/interfaces/IRepositoryBase.py,sha256=jTlViARH5SWIcYXstmXhttvNOShJ5mmAbTEmfGLiRuA,3527
82
+ ormlambda/repository/interfaces/IRepositoryBase.py,sha256=_a1p3wZxF1rDabCcr6a44bGjHyxLvyGgmUO1c6vdv-U,3689
79
83
  ormlambda/repository/interfaces/__init__.py,sha256=t8Mn0aRZm8uF4MGaqjEANTTADCdOwNF0THZ_qebyzwo,126
80
84
  ormlambda/repository/response.py,sha256=TBmWUGGoZChjXVhZXU3F84eUUA1rf7VPeNi92Ae8-2I,4506
81
85
  ormlambda/sql/__init__.py,sha256=0CWQzfxhTRWXozoRsg460o_ZwjW9w4uyL5jQUcD4eHg,121
@@ -112,10 +116,10 @@ ormlambda/sql/clauses/where.py,sha256=Db1IpXnbqAwzZpaThFDSxkrCNLsop__aJ43cDtcZ2S
112
116
  ormlambda/sql/column/__init__.py,sha256=MwBJznOoeNE7tK9oppVtC3784XPkKo0yq9VLlh2lWUY,41
113
117
  ormlambda/sql/column/column.py,sha256=onneRMZJJd85sFkJZhgfcLTCChC-vHPcS7oukt-eSUY,7380
114
118
  ormlambda/sql/comparer.py,sha256=_KQ6gYe0eUg5aOL1i70mV8a1Qa1jI5UQr-0VfAMgVzk,5482
115
- ormlambda/sql/compiler.py,sha256=fdTuGLJNWSQ2z5KEmCpHQKTif9aAAzxgnQrQSAWMeZw,23768
116
- ormlambda/sql/ddl.py,sha256=UK35fQ6tcSYvMhmqCNP8Wo2hBfLAOOomCSTGjMR2lPU,1934
119
+ ormlambda/sql/compiler.py,sha256=dSmF8RYQECPweKZI_TB9stDkLXTJy9FYvAQMNSCY8AY,12967
120
+ ormlambda/sql/ddl.py,sha256=WhVoG_zlTT9DVZlnokHB8B1SC4ZXQSrXTQJ6vlnlpEY,1644
117
121
  ormlambda/sql/elements.py,sha256=ABWQQZn-3CnRLhxxMJYezCRqzt86b5KgZO6Qo55ReWQ,925
118
- ormlambda/sql/foreign_key.py,sha256=BtIy4BgwCJmKtPlk1sr_Z-l5i9uJoSJjjp1FTERMIR8,5947
122
+ ormlambda/sql/foreign_key.py,sha256=a3lLwuIZDo6XIWgEAW7AsmHE2BrF9fa3vMpK_Cq0T_s,5587
119
123
  ormlambda/sql/functions/__init__.py,sha256=hA8t3mUpV2p-pO4TVp5rjC5Yp7aIkWPsS8NpLi3DUh0,171
120
124
  ormlambda/sql/functions/concat.py,sha256=B3uh6SsNjK57jEYvyUW4YVpWGlByeapddDozCF7TYX4,1598
121
125
  ormlambda/sql/functions/max.py,sha256=wXNhFmOlMyD1sKcaBO9asQeXcfY0OvMQPkrlARVXgdg,1651
@@ -125,28 +129,29 @@ ormlambda/sql/interfaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
125
129
  ormlambda/sql/sqltypes.py,sha256=-YyzA-gPTnARoK29bMS6R3GCNvD4LTKvGH1Ev6YfUEY,14207
126
130
  ormlambda/sql/table/__init__.py,sha256=LLZcMLjwFxgBCPhdm5UQYYZDIbtYWCKPO9CbcXsy5zI,50
127
131
  ormlambda/sql/table/fields.py,sha256=ovNR3bJ473aKW-2NhbKr0iJlVpgW06jurHLob2IyZU8,2116
128
- ormlambda/sql/table/table.py,sha256=riorLGKSX-Va5jMVXi6gbqebhNM2ALmPx6xIx4FHW3Y,6328
132
+ ormlambda/sql/table/table.py,sha256=U8ByMDEEXIOwfPykDcjzoyNV1WEieN40Zk18EXveX60,6594
129
133
  ormlambda/sql/table/table_constructor.py,sha256=c3Z-1El0onSClYBmAatoUBYUOT70tITVqtsDJMxZ9QU,1092
130
134
  ormlambda/sql/type_api.py,sha256=FdEUBpdPbHIag--OU3mHY8vxMqyyzTMYygDBCUvGlcU,980
131
135
  ormlambda/sql/types.py,sha256=lQxC5gbhDPRckGSRJZ4rYSZr-XUvIMMH8WfkN1wtM1g,844
132
136
  ormlambda/sql/visitors.py,sha256=FJdnaiF86xK699Kq1qfHFSPtmeVsDX_PaUNHAoP8Tck,1967
133
137
  ormlambda/statements/__init__.py,sha256=kmd5K0dXiLQ2xTYlhd2yXeG2l955RtpDkrAIkZlfad8,148
134
138
  ormlambda/statements/base_statement.py,sha256=Dw89C2-eSwtuNc8UqzQMkoVuykf0gIWyA81YoXu6CQQ,4985
135
- ormlambda/statements/interfaces/IStatements.py,sha256=c4GLGWEUlmi2u5wcnHLLLhLzoP4PmJnU16gciEVGu48,12883
139
+ ormlambda/statements/interfaces/IStatements.py,sha256=b2eQBeEoRivehhopmm-gca6qRSZ3ld06YMEHQEVP1d8,12824
136
140
  ormlambda/statements/interfaces/__init__.py,sha256=a3RyTNVA7DwWMqvVi7gFYP4MArdU-RUYixJcxfc79HY,76
137
141
  ormlambda/statements/query_builder.py,sha256=xb_idOh7sZJweBMPwG7Ow1Sl6toNkEBWPEzUcr1XdjU,5851
138
- ormlambda/statements/statements.py,sha256=d5JjgH2UB08Y4M-aoARx-eC0l6J2HJmszhNZmqeOJ2Q,12690
142
+ ormlambda/statements/statements.py,sha256=ZgZdrwXwj4QBpY_ogTy4S-8i3uH42LHEuGOMcInBR1c,12555
139
143
  ormlambda/statements/types.py,sha256=wNxgXOlL8zBT9PtVgDSnEZFmZdNAJhSzxsR9QLMzO0A,1873
140
144
  ormlambda/types/__init__.py,sha256=xVFaIMcfJvbbXs8BAvmBh8FwSiLn2R6yjZs9o-h08XM,323
141
145
  ormlambda/types/metadata.py,sha256=93eJItdVDOItf7YRJUVmN_m79WLa3Ge6I414ewYnKeM,624
142
- ormlambda/util/__init__.py,sha256=PPwBGABqLG8VReokTt1pMLP3WKRPjVL3wFu7oGwnqSk,2845
146
+ ormlambda/util/__init__.py,sha256=DZWwtrD8tNJxJcK7vdAuTdZeDJC6jBtqIDPv-i8GJFY,2910
147
+ ormlambda/util/load_module.py,sha256=W9NeCuwditS0UuQU0TlVHA65E74NYggEEfdWy1ap9ZI,648
143
148
  ormlambda/util/module_tree/__init__.py,sha256=LNQtqkwO1ul49Th3aHAIiyt0Wt899GmXCc44Uz1eDyY,53
144
149
  ormlambda/util/module_tree/dfs_traversal.py,sha256=lSF03G63XtJFLp03ueAmsHMBvhUkjptDbK3IugXm8iU,1425
145
- ormlambda/util/module_tree/dynamic_module.py,sha256=SQ1FZW2Es5CdACD0VS8v_UZQTuFYbUWs6diAtMbKMoA,8699
150
+ ormlambda/util/module_tree/dynamic_module.py,sha256=vJOqvm5-WKksudXBK1IcTn4WsuLxt1qXNISq-_21sy4,8705
146
151
  ormlambda/util/plugin_loader.py,sha256=p6WLn-MF1bQd2i2GHy98WQjNKmbQdqIUyTFIcBIHC5M,1034
147
152
  ormlambda/util/typing.py,sha256=Z7irz53ui0hoFnJTe06NX4JPl60_thgdjJIxh5gjGGk,169
148
- ormlambda-3.34.0.dist-info/AUTHORS,sha256=uWpOHaCPTOLbVkk5x9McoLwbgzSeCg7yILeDRyMGWGM,606
149
- ormlambda-3.34.0.dist-info/LICENSE,sha256=xBprFw8GJLdHMOoUqDk0427EvjIcbEREvXXVFULuuXU,1080
150
- ormlambda-3.34.0.dist-info/METADATA,sha256=Txg7W3AOTMVHGnKZPajK1d12uWupCfW7TmSKu7xbX0w,13377
151
- ormlambda-3.34.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
152
- ormlambda-3.34.0.dist-info/RECORD,,
153
+ ormlambda-3.34.1.dist-info/AUTHORS,sha256=uWpOHaCPTOLbVkk5x9McoLwbgzSeCg7yILeDRyMGWGM,606
154
+ ormlambda-3.34.1.dist-info/LICENSE,sha256=xBprFw8GJLdHMOoUqDk0427EvjIcbEREvXXVFULuuXU,1080
155
+ ormlambda-3.34.1.dist-info/METADATA,sha256=q1FalyMLHthaHwhaCbL2lzNdIq6pkyZdvoVQSeb-Tas,13326
156
+ ormlambda-3.34.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
157
+ ormlambda-3.34.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.2
2
+ Generator: poetry-core 1.9.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1 +0,0 @@
1
- from .repository import MySQLRepository