matrx-orm 3.1.41__tar.gz → 3.1.43__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.
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/PKG-INFO +1 -1
- matrx_orm-3.1.43/matrx_orm/core/FEATURE.md +10 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/async_db_manager.py +22 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/exceptions.py +11 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/pyproject.toml +1 -1
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_bulk_update_by_pk.py +19 -1
- matrx_orm-3.1.43/tests/level1/test_execute_query_integrity_mapping.py +75 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/.gitignore +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/AGENTS.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/BASE_CLASS_METHODS.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/CLAUDE.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/MODEL_API.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/database/orm/extended/managers/ai_model_base.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/docs/migrations.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/MODULE_README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/adapters/MODULE_README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/adapters/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/adapters/async_postgresql.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/adapters/base_adapter.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/adapters/postgresql.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/adapters/postgrest_client_adapter.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/adapters/supabase_adapter.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/admin/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/admin/router.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/api/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/api/auth.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/api/config.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/api/handlers.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/api/protocol.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/api/server.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/associations.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/cache_debug.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/catalog.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/client/MODULE_README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/client/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/client/postgres_connection.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/client/postgrest.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/client/supabase_auth.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/client/supabase_config.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/client/supabase_manager.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/EXTENDED-TASK.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/MODULE_README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/RELATIONS-TASKS.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/TASKS.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/base.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/config.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/connections.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/db_function.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/diagnostics.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/expressions.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/extended.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/fields.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/introspection.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/listen.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/loop_filters.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/model_dto.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/model_view.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/paginator.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/pool_maintenance.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/pydantic_bridge.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/registry.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/relations.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/resilience.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/rls_session.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/signals.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/tls.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/transaction.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/types.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/core/write_queue.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/entity.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/error_handling.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/extended/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/extended/app_error_handler.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/identity_rule.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/middleware/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/middleware/base.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/migrations/MODULE_README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/migrations/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/migrations/cli.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/migrations/ddl.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/migrations/diff.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/migrations/executor.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/migrations/integration.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/migrations/loader.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/migrations/operations.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/migrations/state.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/migrations/table_filter.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/MODULE_README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/bulk_update_values.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/conflict.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/conflict_writes.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/create.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/db_functions.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/delete.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/dynamic_admin.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/dynamic_crud.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/graph_walk.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/latest_rows.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/queue_claim.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/read.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/relational_backfill.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/staging_load.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/operations/update.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/py.typed +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/python_sql/MODULE_README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/python_sql/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/python_sql/db_objects.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/python_sql/table_detailed_relationships.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/python_sql/table_typescript_relationship.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/query/FEATURE.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/query/MODULE_README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/query/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/query/builder.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/query/executor.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/MODULE_README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/code_handler.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/codegen_writer.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/columns.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/common.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/diff_preview.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/entity_capabilities.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/generator.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/helpers/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/helpers/base_generators.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/helpers/entity_generators.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/helpers/git_checker.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/package_wiring.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/relationships.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/runner.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/schema.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/schema_manager.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/tables.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/schema_builder/views.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/secrets_battery/FEATURE.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/secrets_battery/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/secrets_battery/crypto.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/secrets_battery/items.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/secrets_battery/model.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/secrets_battery/org_service.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/secrets_battery/service.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/session/README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/session/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/session/coalesce.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/session/dag.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/session/errors.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/session/fallback.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/session/flush.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/session/lifecycle.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/session/managed.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/session/op.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/session/reads.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/session/session.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/session/telemetry.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/sql_executor/MODULE_README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/sql_executor/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/sql_executor/executor.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/sql_executor/queries.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/sql_executor/registry.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/sql_executor/types.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/sql_executor/utils.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/state.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/utils/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/utils/sql_utils.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/matrx_orm/utils/type_converters.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/scripts/git-branches.sh +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/scripts/publish.sh +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/scripts/release.sh +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/MODULE_README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/conftest.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/MODULE_README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_admin_db_columns.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_admin_search_negation.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_admin_search_sentinels.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_advisory_lock.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_agent_message.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_api_auth.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_api_config.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_api_handlers.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_api_protocol.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_array_agg_order_by.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_associations.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_bulk_upsert_increment_set_fields.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_cache_debug.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_call_function.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_case_when.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_catalog.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_composite_pk_filter.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_composite_pk_write_paths.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_config.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_conflict_target.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_conflict_writes.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_connection_codecs.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_connection_poison_guard.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_connection_primitives.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_count_composite_distinct.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_db_function_field.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_ddl_generator.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_derived_table.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_dirty_tracking.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_dynamic_crud.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_exceptions.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_expression_primitives.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_fields.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_filter_jsonb_agg_array_index.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_from_alias.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_fts.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_func_expression_args.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_graph_walk.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_having_annotate_alias.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_insert_ignore_and_admin_primitives.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_introspect_rls_policies.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_join_and_aggregate.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_latest_rows.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_listen_notify.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_managed_write_guard.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_matrx_entity.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_migration_diff_types.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_migration_loader.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_model_instance.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_model_meta.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_order_by_expression.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_patch_jsonb_path.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_pool_loop_recreation.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_pool_maintenance.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_postgrest_filters.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_pydantic_bridge.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_query_builder.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_query_error_detail.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_query_executor_sql.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_query_timeout.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_querybuilder_clone_semantics.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_queue_claim.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_registry.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_registry_multi_database.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_registry_multi_schema.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_relational_backfill.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_relations.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_resilience.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_schema_exists.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_session_advisory_lock.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_state_cache.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_subquery_filter_raw.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_subquery_in_filter.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_supabase_auth.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_supabase_config.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_tls.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_typed_join_projection.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_typed_predicates.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_update_case_expression.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_update_subquery.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_upsert_default_leak.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_upsert_with_conflict.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_values_jsonb_decode.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_watched_lifecycle.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level1/test_write_retry_semantics.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level2/MODULE_README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level2/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level2/conftest.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level2/test_bulk_ops.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level2/test_cache_integration.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level2/test_crud.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level2/test_foreign_keys.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level2/test_m2m.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level2/test_manager.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level2/test_migrations_live.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level2/test_query_execution.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/level2/test_schema_diff.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/sample_project/.env.example +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/sample_project/README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/sample_project/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/sample_project/generate.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/sample_project/generated/.gitkeep +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/sample_project/matrx_orm.yaml +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/sample_project/test_schema_generation.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/sample_project_desktop/.env.example +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/sample_project_desktop/README.md +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/sample_project_desktop/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/sample_project_desktop/client_example.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/sample_project_desktop/client_example.ts +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/sample_project_desktop/client_supabase_example.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/sample_project_desktop/server.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/schema/entity_tests.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/schema/test_base_generation.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/schema/test_composite_pk_fk_generation.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/schema/test_composite_unique_generation.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/schema/test_dto_identity_generation.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/schema/test_entity_capability_generation.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/schema/test_generate_schema.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/schema/test_junction_analysis.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/schema/test_multi_schema_output.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/schema/test_sql_expression_defaults.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/schema/test_view_generation.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/schema_builder/test_focused_generation_plan.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/session/__init__.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/session/conftest.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/session/test_cache_no_downgrade.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/session/test_capture_poison_proof.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/session/test_coalesce.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/session/test_dag.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/session/test_disk_spill_fallback.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/session/test_flush_individual_fallback.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/session/test_governed_write.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/session/test_managed.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/session/test_op_enqueue_site.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/session/test_reads.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/session/test_session.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/test_database_name_alias.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/test_db_functions.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/test_model_cls_refactor.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/test_no_blocking_asyncpg_tls.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/test_secrets_battery.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/test_sql_param_casts.py +0 -0
- {matrx_orm-3.1.41 → matrx_orm-3.1.43}/tests/test_sync_twins_guard.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: matrx-orm
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.43
|
|
4
4
|
Summary: Async-first PostgreSQL ORM with bidirectional migrations, schema introspection, many-to-many relationships, and built-in state caching
|
|
5
5
|
Project-URL: Homepage, https://github.com/AI-Matrix-Engine/aidream-current
|
|
6
6
|
Project-URL: Repository, https://github.com/AI-Matrix-Engine/aidream-current
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Database execution error contract
|
|
2
|
+
|
|
3
|
+
`AsyncDatabaseManager.execute_query` must classify every PostgreSQL integrity
|
|
4
|
+
constraint violation as `IntegrityError`. Known categories retain their useful
|
|
5
|
+
labels (`unique`, `foreign_key`, `not_null`, `check`, `exclusion`, and
|
|
6
|
+
`restrict`); an unrecognized SQLSTATE class-23 subtype uses `constraint`.
|
|
7
|
+
|
|
8
|
+
`UnknownDatabaseError` is reserved for genuinely unrecognized driver failures.
|
|
9
|
+
It is diagnostic and intentionally verbose, so a known PostgreSQL error must
|
|
10
|
+
never reach that fallback.
|
|
@@ -67,6 +67,16 @@ _SCHEMA_MISMATCH_EXC = (
|
|
|
67
67
|
)
|
|
68
68
|
|
|
69
69
|
|
|
70
|
+
def _integrity_constraint_kind(exc: asyncpg.exceptions.IntegrityConstraintViolationError) -> str:
|
|
71
|
+
if isinstance(exc, asyncpg.exceptions.CheckViolationError):
|
|
72
|
+
return "check"
|
|
73
|
+
if isinstance(exc, asyncpg.exceptions.ExclusionViolationError):
|
|
74
|
+
return "exclusion"
|
|
75
|
+
if isinstance(exc, asyncpg.exceptions.RestrictViolationError):
|
|
76
|
+
return "restrict"
|
|
77
|
+
return "constraint"
|
|
78
|
+
|
|
79
|
+
|
|
70
80
|
# ── pool-acquire retry (warmup-lag survival) ──────────────────────────────────
|
|
71
81
|
# A ``pool.acquire()`` timeout fires BEFORE any SQL is sent to the server (the
|
|
72
82
|
# connection was never handed out), so retrying is provably side-effect-free —
|
|
@@ -834,6 +844,12 @@ class AsyncDatabaseManager:
|
|
|
834
844
|
) from None
|
|
835
845
|
except asyncpg.exceptions.NotNullViolationError as e:
|
|
836
846
|
raise IntegrityError(model=None, constraint="not_null", original_error=e) from None
|
|
847
|
+
except asyncpg.exceptions.IntegrityConstraintViolationError as e:
|
|
848
|
+
raise IntegrityError(
|
|
849
|
+
model=None,
|
|
850
|
+
constraint=_integrity_constraint_kind(e),
|
|
851
|
+
original_error=e,
|
|
852
|
+
) from None
|
|
837
853
|
except asyncpg.exceptions.DataError as e:
|
|
838
854
|
raise ParameterError(model=None, query=query, args=args, reason=str(e)) from None
|
|
839
855
|
except _SCHEMA_MISMATCH_EXC as e:
|
|
@@ -930,6 +946,12 @@ class AsyncDatabaseManager:
|
|
|
930
946
|
constraint="not_null",
|
|
931
947
|
original_error=e,
|
|
932
948
|
) from None
|
|
949
|
+
except asyncpg.exceptions.IntegrityConstraintViolationError as e:
|
|
950
|
+
raise IntegrityError(
|
|
951
|
+
model=None,
|
|
952
|
+
constraint=_integrity_constraint_kind(e),
|
|
953
|
+
original_error=e,
|
|
954
|
+
) from None
|
|
933
955
|
except asyncpg.exceptions.ConnectionDoesNotExistError as e:
|
|
934
956
|
raise ConnectionError(
|
|
935
957
|
model=None,
|
|
@@ -1200,6 +1200,17 @@ class IntegrityError(DatabaseError):
|
|
|
1200
1200
|
lines.append(" - Read the DB error above: the column name is between")
|
|
1201
1201
|
lines.append(' `null value in column "<name>"` and the rest of the message.')
|
|
1202
1202
|
lines.append(" - Pass the field explicitly (or set a default on the model).")
|
|
1203
|
+
elif constraint == "check":
|
|
1204
|
+
lines.append(" - A CHECK constraint rejected values that violate a database invariant.")
|
|
1205
|
+
lines.append(" - Read the DB error above for the invariant and offending row.")
|
|
1206
|
+
lines.append(" - This is not transient; correct the input or the write ordering.")
|
|
1207
|
+
elif constraint == "exclusion":
|
|
1208
|
+
lines.append(" - This row conflicts with an existing row under an exclusion constraint.")
|
|
1209
|
+
lines.append(" - Read the DB error above for the conflicting key or range.")
|
|
1210
|
+
lines.append(" - This is not safe to blindly retry with unchanged input.")
|
|
1211
|
+
elif constraint == "restrict":
|
|
1212
|
+
lines.append(" - A dependent row prevents this operation under a RESTRICT constraint.")
|
|
1213
|
+
lines.append(" - Remove or reassign the dependency before retrying.")
|
|
1203
1214
|
else:
|
|
1204
1215
|
lines.append(" - The database rejected the write due to a constraint violation.")
|
|
1205
1216
|
lines.append(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "matrx-orm"
|
|
3
|
-
version = "3.1.
|
|
3
|
+
version = "3.1.43"
|
|
4
4
|
description = "Async-first PostgreSQL ORM with bidirectional migrations, schema introspection, many-to-many relationships, and built-in state caching"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { text = "MIT" }
|
|
@@ -7,10 +7,12 @@ connection (no live DB needed), mirroring ``test_call_function.py``.
|
|
|
7
7
|
|
|
8
8
|
from __future__ import annotations
|
|
9
9
|
|
|
10
|
+
from datetime import UTC, datetime
|
|
11
|
+
|
|
10
12
|
import pytest
|
|
11
13
|
from matrx_orm import Now
|
|
12
14
|
from matrx_orm.core.base import Model, ModelMeta
|
|
13
|
-
from matrx_orm.core.fields import CharField, IntegerField, UUIDField
|
|
15
|
+
from matrx_orm.core.fields import CharField, DateTimeField, IntegerField, UUIDField
|
|
14
16
|
from matrx_orm.core.registry import ModelRegistry
|
|
15
17
|
from matrx_orm.operations.bulk_update_values import bulk_update_by_pk
|
|
16
18
|
|
|
@@ -32,6 +34,7 @@ def _make_model():
|
|
|
32
34
|
"id": UUIDField(primary_key=True),
|
|
33
35
|
"chunk_index": IntegerField(),
|
|
34
36
|
"source_hash": CharField(max_length=64),
|
|
37
|
+
"last_seen": DateTimeField(),
|
|
35
38
|
"_database": "test_db",
|
|
36
39
|
"_table_name": "kg_chunks",
|
|
37
40
|
"_db_schema": "rag",
|
|
@@ -121,6 +124,21 @@ class TestBulkUpdateByPk:
|
|
|
121
124
|
assert "DROP TABLE" not in conn.captured_sql
|
|
122
125
|
assert conn.captured_params[-1] == "now(); DROP TABLE users"
|
|
123
126
|
|
|
127
|
+
async def test_timestamptz_cast_is_rendered_for_datetime_values(self):
|
|
128
|
+
Chunk = _make_model()
|
|
129
|
+
conn = _FakeConn(fetch_return=[{"?column?": 1}])
|
|
130
|
+
observed_at = datetime(2026, 7, 28, tzinfo=UTC)
|
|
131
|
+
|
|
132
|
+
await bulk_update_by_pk(
|
|
133
|
+
Chunk,
|
|
134
|
+
[{"id": "a-id", "last_seen": observed_at}],
|
|
135
|
+
casts={"id": "uuid", "last_seen": "timestamptz"},
|
|
136
|
+
connection=conn,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
assert "::timestamptz" in conn.captured_sql
|
|
140
|
+
assert observed_at in conn.captured_params
|
|
141
|
+
|
|
124
142
|
async def test_unsafe_cast_type_is_rejected(self):
|
|
125
143
|
Chunk = _make_model()
|
|
126
144
|
with pytest.raises(ValueError, match="invalid cast declaration"):
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from contextlib import asynccontextmanager
|
|
4
|
+
|
|
5
|
+
import asyncpg
|
|
6
|
+
import pytest
|
|
7
|
+
|
|
8
|
+
from matrx_orm.core.async_db_manager import AsyncDatabaseManager
|
|
9
|
+
from matrx_orm.core.transaction import _active_connection
|
|
10
|
+
from matrx_orm.exceptions import IntegrityError
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class _RejectingConnection:
|
|
14
|
+
def __init__(self, error: Exception) -> None:
|
|
15
|
+
self.error = error
|
|
16
|
+
|
|
17
|
+
async def fetch(self, *_args, **_kwargs):
|
|
18
|
+
raise self.error
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@pytest.mark.asyncio
|
|
22
|
+
async def test_check_violation_is_integrity_error_inside_transaction() -> None:
|
|
23
|
+
connection = _RejectingConnection(
|
|
24
|
+
asyncpg.exceptions.CheckViolationError("invalid canonical crawl artifact file")
|
|
25
|
+
)
|
|
26
|
+
token = _active_connection.set(connection)
|
|
27
|
+
try:
|
|
28
|
+
with pytest.raises(IntegrityError) as exc_info:
|
|
29
|
+
await AsyncDatabaseManager.execute_query("main", "INSERT INTO web.screenshot ...")
|
|
30
|
+
finally:
|
|
31
|
+
_active_connection.reset(token)
|
|
32
|
+
|
|
33
|
+
assert exc_info.value.details["constraint"] == "check"
|
|
34
|
+
assert "invalid canonical crawl artifact file" in exc_info.value.message
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@pytest.mark.asyncio
|
|
38
|
+
async def test_check_violation_is_integrity_error_with_pooled_connection(
|
|
39
|
+
monkeypatch: pytest.MonkeyPatch,
|
|
40
|
+
) -> None:
|
|
41
|
+
connection = _RejectingConnection(
|
|
42
|
+
asyncpg.exceptions.CheckViolationError("invalid canonical crawl artifact file")
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
@asynccontextmanager
|
|
46
|
+
async def fake_get_connection(cls, config_name: str, acquire_timeout: float):
|
|
47
|
+
del cls, config_name, acquire_timeout
|
|
48
|
+
yield connection
|
|
49
|
+
|
|
50
|
+
monkeypatch.setattr(
|
|
51
|
+
AsyncDatabaseManager,
|
|
52
|
+
"get_connection",
|
|
53
|
+
classmethod(fake_get_connection),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
with pytest.raises(IntegrityError) as exc_info:
|
|
57
|
+
await AsyncDatabaseManager.execute_query("main", "INSERT INTO web.screenshot ...")
|
|
58
|
+
|
|
59
|
+
assert exc_info.value.details["constraint"] == "check"
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
@pytest.mark.parametrize(
|
|
63
|
+
("error", "expected"),
|
|
64
|
+
[
|
|
65
|
+
(asyncpg.exceptions.ExclusionViolationError("overlapping range"), "exclusion"),
|
|
66
|
+
(asyncpg.exceptions.RestrictViolationError("dependent rows exist"), "restrict"),
|
|
67
|
+
],
|
|
68
|
+
)
|
|
69
|
+
def test_other_integrity_constraint_kinds_are_classified(
|
|
70
|
+
error: asyncpg.exceptions.IntegrityConstraintViolationError,
|
|
71
|
+
expected: str,
|
|
72
|
+
) -> None:
|
|
73
|
+
from matrx_orm.core.async_db_manager import _integrity_constraint_kind
|
|
74
|
+
|
|
75
|
+
assert _integrity_constraint_kind(error) == expected
|
|
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
|
|
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
|
|
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
|