sql-athame 0.4.0a12__tar.gz → 0.4.0a14__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.
Files changed (28) hide show
  1. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/.bumpversion.cfg +1 -1
  2. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/PKG-INFO +7 -4
  3. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/README.md +6 -3
  4. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/pyproject.toml +1 -1
  5. sql_athame-0.4.0a14/sql_athame/base.py +797 -0
  6. sql_athame-0.4.0a14/sql_athame/dataclasses.py +1645 -0
  7. sql_athame-0.4.0a14/tests/test_asyncpg.py +566 -0
  8. sql_athame-0.4.0a14/tests/test_dataclasses.py +481 -0
  9. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/uv.lock +1 -1
  10. sql_athame-0.4.0a12/sql_athame/base.py +0 -318
  11. sql_athame-0.4.0a12/sql_athame/dataclasses.py +0 -827
  12. sql_athame-0.4.0a12/tests/test_asyncpg.py +0 -323
  13. sql_athame-0.4.0a12/tests/test_dataclasses.py +0 -216
  14. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/.editorconfig +0 -0
  15. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/.github/workflows/publish.yml +0 -0
  16. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/.github/workflows/test.yml +0 -0
  17. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/.gitignore +0 -0
  18. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/LICENSE +0 -0
  19. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/docker-compose.yml +0 -0
  20. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/run +0 -0
  21. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/sql_athame/__init__.py +0 -0
  22. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/sql_athame/escape.py +0 -0
  23. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/sql_athame/py.typed +0 -0
  24. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/sql_athame/sqlalchemy.py +0 -0
  25. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/sql_athame/types.py +0 -0
  26. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/tests/__init__.py +0 -0
  27. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/tests/test_basic.py +0 -0
  28. {sql_athame-0.4.0a12 → sql_athame-0.4.0a14}/tests/test_sqlalchemy.py +0 -0
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 0.4.0-alpha-12
2
+ current_version = 0.4.0-alpha-14
3
3
  parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<release>.*)-(?P<build>\d+))?
4
4
  serialize =
5
5
  {major}.{minor}.{patch}-{release}-{build}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sql-athame
3
- Version: 0.4.0a12
3
+ Version: 0.4.0a14
4
4
  Summary: Python tool for slicing and dicing SQL
5
5
  Project-URL: homepage, https://github.com/bdowning/sql-athame
6
6
  Project-URL: repository, https://github.com/bdowning/sql-athame
@@ -19,6 +19,9 @@ Python tool for slicing and dicing SQL. Its intended target is
19
19
  Postgres with _asyncpg_, though it also includes support for rendering
20
20
  to a SQLAlchemy `TextClause`.
21
21
 
22
+ _Note that current docstrings are autogenerated and have not been
23
+ carefully reviewed; take them with a grain of salt!_
24
+
22
25
  ## Base query builder
23
26
 
24
27
  ### Example
@@ -334,9 +337,9 @@ Requires SQLAlchemy to be installed, otherwise raises `ImportError`.
334
337
  from dataclasses import dataclass, field
335
338
  from datetime import date
336
339
  from uuid import UUID, uuid4
337
- from typing import Optional
340
+ from typing import Annotated, Optional
338
341
 
339
- from sql_athame import ModelBase, model_field_metadata as MD, sql
342
+ from sql_athame import ModelBase, ColumnInfo, sql
340
343
 
341
344
 
342
345
  @dataclass
@@ -345,7 +348,7 @@ class Person(ModelBase, table_name="people", primary_key="id"):
345
348
  name: str
346
349
  birthday: date
347
350
  title: Optional[str] = None
348
- extra: Optional[dict] = field(default=None, metadata=MD(type="JSONB"))
351
+ extra: Optional[Annotated[dict, ColumnInfo(type="JSONB")]] = None
349
352
 
350
353
 
351
354
  >>> list(Person.create_table_sql())
@@ -4,6 +4,9 @@ Python tool for slicing and dicing SQL. Its intended target is
4
4
  Postgres with _asyncpg_, though it also includes support for rendering
5
5
  to a SQLAlchemy `TextClause`.
6
6
 
7
+ _Note that current docstrings are autogenerated and have not been
8
+ carefully reviewed; take them with a grain of salt!_
9
+
7
10
  ## Base query builder
8
11
 
9
12
  ### Example
@@ -319,9 +322,9 @@ Requires SQLAlchemy to be installed, otherwise raises `ImportError`.
319
322
  from dataclasses import dataclass, field
320
323
  from datetime import date
321
324
  from uuid import UUID, uuid4
322
- from typing import Optional
325
+ from typing import Annotated, Optional
323
326
 
324
- from sql_athame import ModelBase, model_field_metadata as MD, sql
327
+ from sql_athame import ModelBase, ColumnInfo, sql
325
328
 
326
329
 
327
330
  @dataclass
@@ -330,7 +333,7 @@ class Person(ModelBase, table_name="people", primary_key="id"):
330
333
  name: str
331
334
  birthday: date
332
335
  title: Optional[str] = None
333
- extra: Optional[dict] = field(default=None, metadata=MD(type="JSONB"))
336
+ extra: Optional[Annotated[dict, ColumnInfo(type="JSONB")]] = None
334
337
 
335
338
 
336
339
  >>> list(Person.create_table_sql())
@@ -8,7 +8,7 @@ dependencies = [
8
8
  "typing-extensions",
9
9
  ]
10
10
  name = "sql-athame"
11
- version = "0.4.0-alpha-12"
11
+ version = "0.4.0-alpha-14"
12
12
  description = "Python tool for slicing and dicing SQL"
13
13
  readme = "README.md"
14
14