TypeDAL 3.13.0__tar.gz → 3.13.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.
Potentially problematic release.
This version of TypeDAL might be problematic. Click here for more details.
- {typedal-3.13.0 → typedal-3.13.1}/CHANGELOG.md +6 -0
- {typedal-3.13.0 → typedal-3.13.1}/PKG-INFO +1 -1
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/__about__.py +1 -1
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/core.py +14 -4
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_query_builder.py +2 -0
- {typedal-3.13.0 → typedal-3.13.1}/.github/workflows/su6.yml +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/.gitignore +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/.readthedocs.yml +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/README.md +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/coverage.svg +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/docs/1_getting_started.md +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/docs/2_defining_tables.md +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/docs/3_building_queries.md +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/docs/4_relationships.md +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/docs/5_py4web.md +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/docs/6_migrations.md +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/docs/7_mixins.md +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/docs/css/code_blocks.css +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/docs/index.md +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/docs/requirements.txt +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/example_new.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/example_old.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/mkdocs.yml +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/pyproject.toml +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/__init__.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/caching.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/cli.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/config.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/fields.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/for_py4web.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/for_web2py.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/helpers.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/mixins.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/py.typed +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/serializers/as_json.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/types.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/src/typedal/web2py_py4web_shared.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/__init__.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/configs/simple.toml +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/configs/valid.env +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/configs/valid.toml +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_cli.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_config.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_docs_examples.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_helpers.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_json.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_main.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_mixins.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_mypy.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_orm.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_py4web.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_relationships.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_row.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_stats.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_table.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_web2py.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/test_xx_others.py +0 -0
- {typedal-3.13.0 → typedal-3.13.1}/tests/timings.py +0 -0
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
<!--next-version-placeholder-->
|
|
4
4
|
|
|
5
|
+
## v3.13.1 (2025-04-28)
|
|
6
|
+
|
|
7
|
+
### Fix
|
|
8
|
+
|
|
9
|
+
* Pass select kwargs via `.column()` - so you can do e.g. `distinct=True` ([`e5bc168`](https://github.com/trialandsuccess/TypeDAL/commit/e5bc168b90d6a5d214f049de0ef31e544214cc23))
|
|
10
|
+
|
|
5
11
|
## v3.13.0 (2025-04-28)
|
|
6
12
|
|
|
7
13
|
### Feature
|
|
@@ -1018,6 +1018,15 @@ class TableMeta(type):
|
|
|
1018
1018
|
"""
|
|
1019
1019
|
return QueryBuilder(self).select(*a, **kw)
|
|
1020
1020
|
|
|
1021
|
+
def column(self: Type[T_MetaInstance], field: "TypedField[T] | T", **options: Unpack[SelectKwargs]) -> list[T]:
|
|
1022
|
+
"""
|
|
1023
|
+
Get all values in a specific column.
|
|
1024
|
+
|
|
1025
|
+
Shortcut for `.select(field).execute().column(field)`.
|
|
1026
|
+
"""
|
|
1027
|
+
|
|
1028
|
+
return QueryBuilder(self).select(field, **options).execute().column(field)
|
|
1029
|
+
|
|
1021
1030
|
def paginate(self: Type[T_MetaInstance], limit: int, page: int = 1) -> "PaginatedRows[T_MetaInstance]":
|
|
1022
1031
|
"""
|
|
1023
1032
|
See QueryBuilder.paginate!
|
|
@@ -2695,24 +2704,25 @@ class QueryBuilder(typing.Generic[T_MetaInstance]):
|
|
|
2695
2704
|
return save_to_cache(typed_rows, rows)
|
|
2696
2705
|
|
|
2697
2706
|
@typing.overload
|
|
2698
|
-
def column(self, field: TypedField[T]) -> list[T]:
|
|
2707
|
+
def column(self, field: TypedField[T], **options: Unpack[SelectKwargs]) -> list[T]:
|
|
2699
2708
|
"""
|
|
2700
2709
|
If a typedfield is passed, the output type can be safely determined.
|
|
2701
2710
|
"""
|
|
2702
2711
|
|
|
2703
2712
|
@typing.overload
|
|
2704
|
-
def column(self, field: T) -> list[T]:
|
|
2713
|
+
def column(self, field: T, **options: Unpack[SelectKwargs]) -> list[T]:
|
|
2705
2714
|
"""
|
|
2706
2715
|
Otherwise, the output type is loosely determined (assumes `field: type` or Any).
|
|
2707
2716
|
"""
|
|
2708
2717
|
|
|
2709
|
-
def column(self, field: TypedField[T] | T) -> list[T]:
|
|
2718
|
+
def column(self, field: TypedField[T] | T, **options: Unpack[SelectKwargs]) -> list[T]:
|
|
2710
2719
|
"""
|
|
2711
2720
|
Get all values in a specific column.
|
|
2712
2721
|
|
|
2713
2722
|
Shortcut for `.select(field).execute().column(field)`.
|
|
2714
2723
|
"""
|
|
2715
|
-
|
|
2724
|
+
|
|
2725
|
+
return self.select(field, **options).execute().column(field)
|
|
2716
2726
|
|
|
2717
2727
|
def _handle_relationships_pre_select(
|
|
2718
2728
|
self,
|
|
@@ -483,6 +483,8 @@ def test_column():
|
|
|
483
483
|
assert len(rows) == 4
|
|
484
484
|
assert set(rows) == {33}
|
|
485
485
|
|
|
486
|
+
assert TestRelationship.column(TestRelationship.value, distinct=True, orderby=~TestRelationship.value) == [33, 3]
|
|
487
|
+
|
|
486
488
|
|
|
487
489
|
def test_collect_with_extra_fields():
|
|
488
490
|
_setup_data()
|
|
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
|
|
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
|