ferro-orm 0.3.2__tar.gz → 0.3.4__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.
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.github/workflows/ci.yml +56 -1
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.gitignore +3 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/CHANGELOG.md +85 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/Cargo.lock +7 -7
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/Cargo.toml +1 -1
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/PKG-INFO +3 -1
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/README.md +2 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/api/utilities.md +5 -10
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/concepts/performance.md +3 -6
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/faq.md +4 -7
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/getting-started/installation.md +4 -8
- ferro_orm-0.3.4/docs/guide/backend.md +401 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/guide/database.md +13 -35
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/guide/models-and-fields.md +1 -1
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/howto/multiple-databases.md +1 -1
- ferro_orm-0.3.4/docs/howto/testing.md +205 -0
- ferro_orm-0.3.4/docs/plans/2026-04-24-001-refactor-multi-db-backend-architecture-plan.md +473 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/mkdocs.yml +2 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/pyproject.toml +5 -1
- ferro_orm-0.3.4/src/backend.rs +650 -0
- ferro_orm-0.3.4/src/connection.rs +176 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/_core.pyi +4 -2
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/_shadow_fk_types.py +30 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/metaclass.py +2 -48
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/migrations/alembic.py +12 -75
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/models.py +29 -31
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/query/builder.py +10 -4
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/query/nodes.py +14 -7
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/relations/__init__.py +12 -36
- ferro_orm-0.3.4/src/ferro/schema_metadata.py +154 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/lib.rs +1 -0
- ferro_orm-0.3.4/src/operations.rs +2044 -0
- ferro_orm-0.3.4/src/query.rs +343 -0
- ferro_orm-0.3.4/src/schema.rs +422 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/state.rs +38 -6
- ferro_orm-0.3.4/tests/__init__.py +1 -0
- ferro_orm-0.3.4/tests/conftest.py +210 -0
- ferro_orm-0.3.4/tests/db_backends.py +115 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_aggregation.py +1 -10
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_alembic_bridge.py +24 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_alembic_nullability.py +6 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_alembic_type_mapping.py +2 -1
- ferro_orm-0.3.4/tests/test_auto_migrate.py +189 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_bulk_update.py +1 -10
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_composite_unique.py +61 -13
- ferro_orm-0.3.4/tests/test_connection.py +37 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_constraints.py +33 -14
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_crud.py +4 -18
- ferro_orm-0.3.4/tests/test_db_backends.py +126 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_deletion.py +1 -10
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_documentation_features.py +3 -15
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_field_wrapper.py +15 -10
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_helpers.py +1 -10
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_hydration.py +1 -11
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_metadata.py +1 -9
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_one_to_one.py +60 -20
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_query_builder.py +73 -9
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_refresh.py +1 -10
- ferro_orm-0.3.4/tests/test_schema.py +121 -0
- ferro_orm-0.3.4/tests/test_schema_constraints.py +137 -0
- ferro_orm-0.3.4/tests/test_schema_enum_annotations.py +26 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_shadow_fk_types.py +10 -8
- ferro_orm-0.3.4/tests/test_static_contracts.py +8 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_string_search.py +1 -10
- ferro_orm-0.3.4/tests/test_structural_types.py +347 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_temporal_types.py +1 -10
- ferro_orm-0.3.4/tests/test_transactions.py +161 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/uv.lock +92 -1
- ferro_orm-0.3.2/docs/howto/testing.md +0 -123
- ferro_orm-0.3.2/src/connection.rs +0 -68
- ferro_orm-0.3.2/src/operations.rs +0 -1415
- ferro_orm-0.3.2/src/query.rs +0 -112
- ferro_orm-0.3.2/src/schema.rs +0 -300
- ferro_orm-0.3.2/tests/conftest.py +0 -48
- ferro_orm-0.3.2/tests/test_auto_migrate.py +0 -78
- ferro_orm-0.3.2/tests/test_connection.py +0 -27
- ferro_orm-0.3.2/tests/test_schema.py +0 -35
- ferro_orm-0.3.2/tests/test_schema_constraints.py +0 -69
- ferro_orm-0.3.2/tests/test_structural_types.py +0 -106
- ferro_orm-0.3.2/tests/test_transactions.py +0 -93
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.github/PERMISSIONS.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.github/PYPI_CHECKLIST.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.github/PYPI_SETUP.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.github/generated/wheels.generated.yml +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.github/pull_request_template.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.github/workflows/packaging-smoke.yml +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.github/workflows/publish-docs.yml +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.github/workflows/publish.yml +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.github/workflows/release.yml +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.pre-commit-config.yaml +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/.python-version +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/CONTRIBUTING.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/LICENSE +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/TEST_RESULTS.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/api/fields.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/api/model.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/api/query.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/api/relationships.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/api/transactions.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/changelog.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/coming-soon.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/concepts/architecture.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/concepts/identity-map.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/concepts/type-safety.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/contributing.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/getting-started/next-steps.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/getting-started/tutorial.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/guide/migrations.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/guide/mutations.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/guide/queries.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/guide/relationships.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/guide/transactions.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/howto/pagination.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/howto/soft-deletes.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/howto/timestamps.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/index.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/migration-sqlalchemy.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/stylesheets/extra.css +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/docs/why-ferro.md +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/justfile +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/scripts/demo_queries.py +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/__init__.py +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/_annotation_utils.py +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/base.py +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/composite_uniques.py +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/fields.py +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/migrations/__init__.py +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/py.typed +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/query/__init__.py +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/relations/descriptors.py +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/src/ferro/state.py +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_alembic_autogenerate.py +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_docs_examples.py +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_metaclass_internals.py +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_models.py +0 -0
- {ferro_orm-0.3.2 → ferro_orm-0.3.4}/tests/test_relationship_engine.py +0 -0
|
@@ -171,6 +171,60 @@ jobs:
|
|
|
171
171
|
name: python-${{ matrix.python-version }}
|
|
172
172
|
continue-on-error: true
|
|
173
173
|
|
|
174
|
+
test-python-backend-matrix:
|
|
175
|
+
name: Python backend matrix (SQLite + Postgres)
|
|
176
|
+
runs-on: ubuntu-latest
|
|
177
|
+
services:
|
|
178
|
+
postgres:
|
|
179
|
+
image: postgres:17
|
|
180
|
+
env:
|
|
181
|
+
POSTGRES_USER: ferro
|
|
182
|
+
POSTGRES_PASSWORD: ferro
|
|
183
|
+
POSTGRES_DB: ferro
|
|
184
|
+
ports:
|
|
185
|
+
- 5432:5432
|
|
186
|
+
options: >-
|
|
187
|
+
--health-cmd "pg_isready -U ferro -d ferro"
|
|
188
|
+
--health-interval 10s
|
|
189
|
+
--health-timeout 5s
|
|
190
|
+
--health-retries 5
|
|
191
|
+
env:
|
|
192
|
+
FERRO_SUPABASE_URL: postgresql://ferro:ferro@127.0.0.1:5432/ferro?sslmode=disable
|
|
193
|
+
steps:
|
|
194
|
+
- name: Checkout repository
|
|
195
|
+
uses: actions/checkout@v4
|
|
196
|
+
|
|
197
|
+
- name: Set up Python
|
|
198
|
+
uses: actions/setup-python@v5
|
|
199
|
+
with:
|
|
200
|
+
python-version: '3.13'
|
|
201
|
+
|
|
202
|
+
- name: Install UV
|
|
203
|
+
uses: astral-sh/setup-uv@v5
|
|
204
|
+
with:
|
|
205
|
+
enable-cache: true
|
|
206
|
+
|
|
207
|
+
- name: Set up Rust
|
|
208
|
+
uses: dtolnay/rust-toolchain@stable
|
|
209
|
+
|
|
210
|
+
- name: Cache Rust build
|
|
211
|
+
uses: Swatinem/rust-cache@v2
|
|
212
|
+
with:
|
|
213
|
+
prefix-key: v1
|
|
214
|
+
cache-on-failure: true
|
|
215
|
+
|
|
216
|
+
- name: Install dependencies
|
|
217
|
+
run: |
|
|
218
|
+
uv sync --only-group ci-test --no-install-project --python 3.13
|
|
219
|
+
|
|
220
|
+
- name: Build Rust extension
|
|
221
|
+
run: |
|
|
222
|
+
uv run maturin develop
|
|
223
|
+
|
|
224
|
+
- name: Run backend matrix tests
|
|
225
|
+
run: |
|
|
226
|
+
uv run pytest -v -m "backend_matrix or postgres_only" --db-backends=sqlite,postgres
|
|
227
|
+
|
|
174
228
|
check-conventional-commits:
|
|
175
229
|
name: Check Conventional Commits
|
|
176
230
|
runs-on: ubuntu-latest
|
|
@@ -220,7 +274,7 @@ jobs:
|
|
|
220
274
|
|
|
221
275
|
all-checks:
|
|
222
276
|
name: All Checks Passed
|
|
223
|
-
needs: [lint-and-format, test-python-pr, test-python-main, test-rust]
|
|
277
|
+
needs: [lint-and-format, test-python-pr, test-python-main, test-python-backend-matrix, test-rust]
|
|
224
278
|
runs-on: ubuntu-latest
|
|
225
279
|
if: always()
|
|
226
280
|
steps:
|
|
@@ -232,6 +286,7 @@ jobs:
|
|
|
232
286
|
if ! ok "${{ needs.lint-and-format.result }}"; then exit 1; fi
|
|
233
287
|
if ! ok "${{ needs.test-python-pr.result }}"; then exit 1; fi
|
|
234
288
|
if ! ok "${{ needs.test-python-main.result }}"; then exit 1; fi
|
|
289
|
+
if ! ok "${{ needs.test-python-backend-matrix.result }}"; then exit 1; fi
|
|
235
290
|
if ! ok "${{ needs.test-rust.result }}"; then exit 1; fi
|
|
236
291
|
|
|
237
292
|
echo "All checks passed!"
|
|
@@ -1,6 +1,91 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## v0.3.4 (2026-04-25)
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
- Serialize UUID M2M query contexts
|
|
9
|
+
([`f53b3ca`](https://github.com/syn54x/ferro-orm/commit/f53b3ca4219d3cd21174d1cb2215bda717c0ac3d))
|
|
10
|
+
|
|
11
|
+
### Chores
|
|
12
|
+
|
|
13
|
+
- Gitignore .worktrees/ for local worktrees
|
|
14
|
+
([`142cd3f`](https://github.com/syn54x/ferro-orm/commit/142cd3fc1240e2e0ce5597b170455e4355ac98b9))
|
|
15
|
+
|
|
16
|
+
- Update lock file
|
|
17
|
+
([`fa1c003`](https://github.com/syn54x/ferro-orm/commit/fa1c003efd3960c4c7a647ddf0f8ba166c731e01))
|
|
18
|
+
|
|
19
|
+
### Documentation
|
|
20
|
+
|
|
21
|
+
- Add backend guide
|
|
22
|
+
([`78f1e29`](https://github.com/syn54x/ferro-orm/commit/78f1e295052663416e37ce2bef81be06ec602ba0))
|
|
23
|
+
|
|
24
|
+
### Refactoring
|
|
25
|
+
|
|
26
|
+
- Replace Any backend with typed engine
|
|
27
|
+
([`71628a7`](https://github.com/syn54x/ferro-orm/commit/71628a7281e7f6d8ec6a4640eb2512a7589a634d))
|
|
28
|
+
|
|
29
|
+
### Testing
|
|
30
|
+
|
|
31
|
+
- Add local Postgres test provider
|
|
32
|
+
([`f8601a5`](https://github.com/syn54x/ferro-orm/commit/f8601a54b414baefd5f1078470c60b3ee85782db))
|
|
33
|
+
|
|
34
|
+
- Harden bridge-boundary coverage
|
|
35
|
+
([`f1a6064`](https://github.com/syn54x/ferro-orm/commit/f1a60647a799a17ad8adf75c86e9635dd192cc55))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## v0.3.3 (2026-04-24)
|
|
39
|
+
|
|
40
|
+
### Bug Fixes
|
|
41
|
+
|
|
42
|
+
- Cast NULL and strings to ::uuid for Postgres using catalog
|
|
43
|
+
([`f5cb4f0`](https://github.com/syn54x/ferro-orm/commit/f5cb4f08ceaf0763a29c3b78d4d077ca1119fc1c))
|
|
44
|
+
|
|
45
|
+
- Catalog casts for date/timestamp columns on Postgres
|
|
46
|
+
([`95ef5ca`](https://github.com/syn54x/ferro-orm/commit/95ef5cadc28eb26481c38b51dbca1b370a883d10))
|
|
47
|
+
|
|
48
|
+
- Clean up rebase conflicts with main
|
|
49
|
+
([`716511c`](https://github.com/syn54x/ferro-orm/commit/716511c829021ee6d2390bb85c877e670c1d7631))
|
|
50
|
+
|
|
51
|
+
- Enum OIDs
|
|
52
|
+
([`a9867be`](https://github.com/syn54x/ferro-orm/commit/a9867beac242a9d630aeb7e49b718a4234c541ec))
|
|
53
|
+
|
|
54
|
+
- Postgres native enums on save and StrEnum schema registration
|
|
55
|
+
([`44277e1`](https://github.com/syn54x/ferro-orm/commit/44277e1922182b020c17d9a7a2a9e99dd62061e5))
|
|
56
|
+
|
|
57
|
+
- Use Postgres SQL dialect when connecting to postgres URLs
|
|
58
|
+
([`c627ac8`](https://github.com/syn54x/ferro-orm/commit/c627ac8e4fa84555e0cc7250f73ce6f0858125a3))
|
|
59
|
+
|
|
60
|
+
- **postgres**: Add dual-db ORM test matrix
|
|
61
|
+
([`1fa657f`](https://github.com/syn54x/ferro-orm/commit/1fa657fe4335d41214fcb24b1eac5dcf3138273f))
|
|
62
|
+
|
|
63
|
+
- **postgres**: Bind boolean writes as booleans
|
|
64
|
+
([`346441a`](https://github.com/syn54x/ferro-orm/commit/346441a073a540c857a8aaa67bf4029cb4099535))
|
|
65
|
+
|
|
66
|
+
- **postgres**: Cast uuid columns to text in SELECT for Any decode
|
|
67
|
+
([`df957c0`](https://github.com/syn54x/ferro-orm/commit/df957c0202d32608843d6a24ae4c924ed5b9381d))
|
|
68
|
+
|
|
69
|
+
- **postgres**: Cast UUID filter params for sqlx Any compatibility
|
|
70
|
+
([`889cf8b`](https://github.com/syn54x/ferro-orm/commit/889cf8b61131c2d53e8414a76ca7b2dbc7868c23))
|
|
71
|
+
|
|
72
|
+
- **postgres**: Decode native enum columns via text cast
|
|
73
|
+
([`1270f9d`](https://github.com/syn54x/ferro-orm/commit/1270f9dcd1cc5aa19cf484c3d9c3bb3a82255a05))
|
|
74
|
+
|
|
75
|
+
### Refactoring
|
|
76
|
+
|
|
77
|
+
- Expand db matrix coverage and harden postgres paths
|
|
78
|
+
([`b82f3ac`](https://github.com/syn54x/ferro-orm/commit/b82f3ac886459861cdfde122b99b880b85c09a61))
|
|
79
|
+
|
|
80
|
+
- Multi db architecture with true sqlite and postgres support
|
|
81
|
+
([`459a0c5`](https://github.com/syn54x/ferro-orm/commit/459a0c5f9c8a95ecacc9ba552137252d34de4824))
|
|
82
|
+
|
|
83
|
+
### Testing
|
|
84
|
+
|
|
85
|
+
- Expand schema constraints into db matrix
|
|
86
|
+
([`24a7f0a`](https://github.com/syn54x/ferro-orm/commit/24a7f0ad38b90e98a41cf32fe2777d988ff7047f))
|
|
87
|
+
|
|
88
|
+
|
|
4
89
|
## v0.3.2 (2026-04-24)
|
|
5
90
|
|
|
6
91
|
### Bug Fixes
|
|
@@ -79,9 +79,9 @@ checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
|
|
|
79
79
|
|
|
80
80
|
[[package]]
|
|
81
81
|
name = "cc"
|
|
82
|
-
version = "1.2.
|
|
82
|
+
version = "1.2.61"
|
|
83
83
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
84
|
-
checksum = "
|
|
84
|
+
checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d"
|
|
85
85
|
dependencies = [
|
|
86
86
|
"find-msvc-tools",
|
|
87
87
|
"shlex",
|
|
@@ -128,9 +128,9 @@ dependencies = [
|
|
|
128
128
|
|
|
129
129
|
[[package]]
|
|
130
130
|
name = "crc-catalog"
|
|
131
|
-
version = "2.
|
|
131
|
+
version = "2.5.0"
|
|
132
132
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
133
|
-
checksum = "
|
|
133
|
+
checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853"
|
|
134
134
|
|
|
135
135
|
[[package]]
|
|
136
136
|
name = "crossbeam-queue"
|
|
@@ -294,7 +294,7 @@ dependencies = [
|
|
|
294
294
|
|
|
295
295
|
[[package]]
|
|
296
296
|
name = "ferro"
|
|
297
|
-
version = "0.3.
|
|
297
|
+
version = "0.3.4"
|
|
298
298
|
dependencies = [
|
|
299
299
|
"dashmap",
|
|
300
300
|
"once_cell",
|
|
@@ -1191,9 +1191,9 @@ dependencies = [
|
|
|
1191
1191
|
|
|
1192
1192
|
[[package]]
|
|
1193
1193
|
name = "rustls-pki-types"
|
|
1194
|
-
version = "1.14.
|
|
1194
|
+
version = "1.14.1"
|
|
1195
1195
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1196
|
-
checksum = "
|
|
1196
|
+
checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9"
|
|
1197
1197
|
dependencies = [
|
|
1198
1198
|
"zeroize",
|
|
1199
1199
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ferro-orm
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Requires-Dist: pydantic>=2.0
|
|
5
5
|
Requires-Dist: alembic>=1.18.1 ; extra == 'alembic'
|
|
6
6
|
Requires-Dist: sqlalchemy>=2.0.46 ; extra == 'alembic'
|
|
@@ -54,6 +54,8 @@ pip install ferro-orm
|
|
|
54
54
|
pip install "ferro-orm[alembic]"
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
+
Ferro currently supports SQLite and PostgreSQL as runtime backends. Named multi-database routing and custom connection-pool kwargs are planned, but not part of the current public API.
|
|
58
|
+
|
|
57
59
|
## Quick Start
|
|
58
60
|
|
|
59
61
|
```python
|
|
@@ -41,6 +41,8 @@ pip install ferro-orm
|
|
|
41
41
|
pip install "ferro-orm[alembic]"
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
Ferro currently supports SQLite and PostgreSQL as runtime backends. Named multi-database routing and custom connection-pool kwargs are planned, but not part of the current public API.
|
|
45
|
+
|
|
44
46
|
## Quick Start
|
|
45
47
|
|
|
46
48
|
```python
|
|
@@ -17,24 +17,19 @@ await connect("sqlite:example.db?mode=rwc")
|
|
|
17
17
|
# PostgreSQL
|
|
18
18
|
await connect("postgresql://user:password@localhost/dbname")
|
|
19
19
|
|
|
20
|
-
#
|
|
21
|
-
await connect(
|
|
22
|
-
"postgresql://localhost/dbname",
|
|
23
|
-
max_connections=20,
|
|
24
|
-
auto_migrate=True # Development only
|
|
25
|
-
)
|
|
20
|
+
# Auto-migrate during development
|
|
21
|
+
await connect("postgresql://localhost/dbname", auto_migrate=True)
|
|
26
22
|
```
|
|
27
23
|
|
|
28
24
|
See [Database Setup Guide](../guide/database.md) for complete connection options.
|
|
29
25
|
|
|
30
26
|
### disconnect()
|
|
31
27
|
|
|
32
|
-
|
|
28
|
+
This function is not implemented yet.
|
|
33
29
|
|
|
34
30
|
```python
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
await disconnect()
|
|
31
|
+
# Current pattern: connect once during startup
|
|
32
|
+
await connect("sqlite:example.db?mode=rwc")
|
|
38
33
|
```
|
|
39
34
|
|
|
40
35
|
### create_tables()
|
|
@@ -137,14 +137,11 @@ for post in posts:
|
|
|
137
137
|
posts = await Post.select().prefetch_related("author").all()
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
### 6.
|
|
140
|
+
### 6. Reuse a Long-Lived Connection
|
|
141
141
|
|
|
142
142
|
```python
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
max_connections=50, # Tune for your load
|
|
146
|
-
min_connections=10
|
|
147
|
-
)
|
|
143
|
+
# Current API: connect once during startup and reuse it.
|
|
144
|
+
await ferro.connect("postgresql://localhost/db")
|
|
148
145
|
```
|
|
149
146
|
|
|
150
147
|
### 7. Keep Transactions Short
|
|
@@ -137,7 +137,7 @@ Check your Ferro version's API for raw SQL support. Most versions provide an esc
|
|
|
137
137
|
|
|
138
138
|
### Does Ferro support multiple databases?
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
Not yet. Ferro currently supports a single active database connection per application process.
|
|
141
141
|
|
|
142
142
|
See [How-To: Multiple Databases](howto/multiple-databases.md).
|
|
143
143
|
|
|
@@ -198,14 +198,11 @@ Check the error message for details.
|
|
|
198
198
|
### How do I reset the database?
|
|
199
199
|
|
|
200
200
|
```python
|
|
201
|
-
#
|
|
202
|
-
await ferro.
|
|
203
|
-
|
|
204
|
-
# Recreate
|
|
205
|
-
await ferro.create_tables()
|
|
201
|
+
# Reconnect to a fresh SQLite test database
|
|
202
|
+
await ferro.connect("sqlite::memory:", auto_migrate=True)
|
|
206
203
|
```
|
|
207
204
|
|
|
208
|
-
|
|
205
|
+
For persistent environments, use Alembic migrations:
|
|
209
206
|
|
|
210
207
|
```bash
|
|
211
208
|
alembic downgrade base
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- Python 3.10 or higher
|
|
6
6
|
- Supported platforms: macOS, Linux, Windows
|
|
7
|
-
- Database: SQLite
|
|
7
|
+
- Database: SQLite or PostgreSQL
|
|
8
8
|
|
|
9
9
|
## Install Ferro
|
|
10
10
|
|
|
@@ -30,7 +30,7 @@ This installs Alembic and SQLAlchemy (used only for migration generation, not at
|
|
|
30
30
|
|
|
31
31
|
## Database Drivers
|
|
32
32
|
|
|
33
|
-
Ferro uses SQLx under the hood
|
|
33
|
+
Ferro uses SQLx under the hood. SQLite and PostgreSQL support are built into Ferro's published packages, so no additional database-specific packages are required for those backends.
|
|
34
34
|
|
|
35
35
|
### SQLite
|
|
36
36
|
|
|
@@ -40,10 +40,6 @@ No additional setup needed. SQLite is embedded in Ferro.
|
|
|
40
40
|
|
|
41
41
|
No additional setup needed. PostgreSQL support is built into Ferro.
|
|
42
42
|
|
|
43
|
-
### MySQL
|
|
44
|
-
|
|
45
|
-
No additional setup needed. MySQL/MariaDB support is built into Ferro.
|
|
46
|
-
|
|
47
43
|
|
|
48
44
|
## Optional Dependencies
|
|
49
45
|
|
|
@@ -52,10 +48,10 @@ No additional setup needed. MySQL/MariaDB support is built into Ferro.
|
|
|
52
48
|
For running tests and linting:
|
|
53
49
|
|
|
54
50
|
```bash
|
|
55
|
-
|
|
51
|
+
uv sync --group dev
|
|
56
52
|
```
|
|
57
53
|
|
|
58
|
-
This includes pytest,
|
|
54
|
+
This workspace group includes pytest, maturin, docs tooling, and other development dependencies used in this repository.
|
|
59
55
|
|
|
60
56
|
## Building from Source
|
|
61
57
|
|