velocity-python 0.10.1__tar.gz → 0.11.0__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.
- {velocity_python-0.10.1 → velocity_python-0.11.0}/PKG-INFO +1 -1
- {velocity_python-0.10.1 → velocity_python-0.11.0}/pyproject.toml +1 -1
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/__init__.py +1 -1
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/core/column.py +33 -3
- velocity_python-0.11.0/src/velocity/db/core/database.py +183 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/core/decorators.py +36 -18
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/core/engine.py +421 -105
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/core/lazy_engine.py +13 -4
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/core/result.py +67 -1
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/core/row.py +133 -24
- velocity_python-0.11.0/src/velocity/db/core/sequence.py +164 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/core/table.py +416 -109
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/core/transaction.py +439 -18
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/core/view.py +19 -1
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/maintenance.py +125 -15
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/mysql/operators.py +2 -3
- velocity_python-0.11.0/src/velocity/db/servers/mysql/sql.py +1849 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/postgres/__init__.py +60 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/postgres/reserved.py +122 -1
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/postgres/sql.py +200 -76
- velocity_python-0.11.0/src/velocity/db/servers/sqlite/__init__.py +178 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/sqlite/operators.py +2 -2
- velocity_python-0.11.0/src/velocity/db/servers/sqlite/sql.py +1429 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/sqlserver/sql.py +11 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/tablehelper.py +109 -7
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/utils.py +33 -8
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/testing/fake_db.py +25 -25
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity_python.egg-info/PKG-INFO +1 -1
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity_python.egg-info/SOURCES.txt +11 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_batch_operations.py +3 -3
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_connection_pool.py +61 -13
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_db_error_contract.py +10 -1
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_deferred_savepoints.py +2 -1
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_psycopg3_upgrade.py +3 -3
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_result_fetch_errors.py +28 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_return_default_policy.py +1 -1
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_row_cache_staleness.py +14 -9
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_settings.py +3 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_sql_statements_as_built.py +3 -3
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_table_purge.py +3 -3
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_testing_fake_db.py +7 -3
- velocity_python-0.11.0/tests/test_v011_integration.py +50 -0
- velocity_python-0.11.0/tests/test_v011_mysql_parity.py +704 -0
- velocity_python-0.11.0/tests/test_v011_security_final.py +424 -0
- velocity_python-0.11.0/tests/test_v011_security_recheck.py +577 -0
- velocity_python-0.11.0/tests/test_v011_security_review.py +683 -0
- velocity_python-0.11.0/tests/test_v011_sqlite_parity.py +720 -0
- velocity_python-0.11.0/tests/test_v011_table_rows.py +383 -0
- velocity_python-0.11.0/tests/test_v011_table_sql.py +424 -0
- velocity_python-0.11.0/tests/test_v011_tx_pool.py +414 -0
- velocity_python-0.11.0/tests/test_v011_tx_transaction.py +301 -0
- velocity_python-0.11.0/tests/test_v011_tx_tunnel.py +80 -0
- velocity_python-0.10.1/src/velocity/db/core/database.py +0 -125
- velocity_python-0.10.1/src/velocity/db/core/sequence.py +0 -136
- velocity_python-0.10.1/src/velocity/db/servers/mysql/sql.py +0 -766
- velocity_python-0.10.1/src/velocity/db/servers/sqlite/__init__.py +0 -65
- velocity_python-0.10.1/src/velocity/db/servers/sqlite/sql.py +0 -744
- {velocity_python-0.10.1 → velocity_python-0.11.0}/LICENSE +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/README.md +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/setup.cfg +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/amplify.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/analytics.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/assets/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/assets/backfill.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/assets/indexing.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/assets/references.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/assets/service.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/assets/usage_index.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/authz.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/blobs.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/capabilities/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/capabilities/base.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/capabilities/dispatch.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/capabilities/health.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/capabilities/infra.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/capabilities/jobs.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/capabilities/provisioning.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/capabilities/retention.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/capabilities/runtime.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/capabilities/security.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/capabilities/single_session.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/capabilities/workflow.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/deploy/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/deploy/ci_gate.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/deploy/config.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/deploy/frontend_checks.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/deploy/operations.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/deploy/policies.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/deploy/reconcile.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/deploy/targets.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/dirty_pipeline.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/email.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/facets.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/failures.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/feature_flags.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/base_handler.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/context.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/context_factory.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/exceptions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/lambda_handler.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/masquerade.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/mixins/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/mixins/action_names.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/mixins/analytics_actions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/mixins/audit_trail.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/mixins/client_errors.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/mixins/client_input.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/mixins/data_service.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/mixins/job_handler.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/mixins/permissions_actions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/mixins/row_scoped.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/mixins/session_control.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/mixins/tiles_actions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/mixins/web_handler.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/mixins/workflow_actions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/perf.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/request_log.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/response.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/handlers/sqs_handler.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/identity.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/job_lifecycle.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/job_results.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/mirror.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/ops.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/permissions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/queue_defaults.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/runtime/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/runtime/auth_audit.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/runtime/continuation.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/runtime/jobs.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/runtime/limits.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/runtime/queue.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/runtime/queue_actions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/runtime/security_log.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/runtime/site_time.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/runtime/tick.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/s3.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/scheduler.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/schema.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/settings.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/sms.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/ssm_config.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/tests/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/tests/test_base_handler_error_response.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/tests/test_deploy_least_privilege.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/tests/test_deploy_policies.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/tests/test_deploy_policy_size.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/tests/test_deploy_reconcile.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/tests/test_email.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/tests/test_lambda_handler_json_serialization.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/tests/test_response.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/tests/test_sms.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/tiles.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/user_data.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/aws/validation.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/cache.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/_pgddl.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/audit.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/core/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/core/jsonproxy.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/core/source_policy.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/effective.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/exceptions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/fragments.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/integrity.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/lane/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/lane/cli.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/lane/connect.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/lane/ensure.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/lane/ledger.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/lane/units.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/lane/user_data_fold.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/migrations.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/base/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/base/initializer.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/base/operators.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/base/sql.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/base/types.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/mysql/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/mysql/reserved.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/mysql/types.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/postgres/operators.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/postgres/types.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/sqlite/reserved.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/sqlite/types.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/sqlserver/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/sqlserver/operators.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/sqlserver/reserved.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/servers/sqlserver/types.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/sync.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/common_db_test.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/common.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/conftest.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_column.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_connections.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_database.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_engine.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_general_usage.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_imports.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_integrity_triggers.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_result.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_row.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_row_comprehensive.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_schema_locking.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_schema_locking_unit.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_sequence.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_sql_comprehensive.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_table.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_table_comprehensive.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/postgres/test_transaction.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/sql/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/sql/common.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/sql/test_postgres_select_advanced.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/sql/test_postgres_select_variances.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/test_cursor_rowcount_fix.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/test_db_utils.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/test_postgres.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/test_postgres_unchanged.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/test_process_error_robustness.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/test_result_caching.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/test_result_sql_aware.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/test_row_get_missing_column.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/test_schema_locking_initializers.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/test_schema_locking_simple.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/test_sql_builder.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/test_tablehelper.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tests/test_view_helper.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/db/tunnel.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/hooks.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/logging.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/metadata/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/metadata/declarations.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/metadata/merge.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/metadata/validate.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/conv/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/conv/iconv.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/conv/oconv.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/db.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/export.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/format.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/mail.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/merge.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/pdf.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/qr.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/tests/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/tests/test_db.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/tests/test_fix.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/tests/test_format.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/tests/test_iconv.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/tests/test_mail_send.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/tests/test_merge.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/tests/test_oconv.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/tests/test_original_error.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/tests/test_timer.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/timer.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/misc/tools.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/core/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/core/capabilities.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/core/store.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/core/where.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/exceptions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/servers/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/servers/base/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/servers/cassandra/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/servers/cassandra/translation.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/servers/couchbase/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/servers/couchbase/translation.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/servers/dynamodb/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/servers/dynamodb/translation.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/servers/elasticsearch/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/servers/elasticsearch/translation.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/servers/memory/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/servers/mongodb/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/servers/mongodb/translation.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/nosql/servers/redis/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/_mirror_core.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/authorizenet_adapter.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/authorizenet_mirror.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/base_adapter.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/braintree_adapter.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/braintree_mirror.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/charge_rules.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/money.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/plaid_api.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/plaid_webhook.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/redact.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/schema.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/stripe_adapter.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/payment/stripe_mirror.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/rules/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/rules/engine.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/rules/expressions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/rules/facts.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/rules/storage.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/testing/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/workflow/__init__.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/workflow/access.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/workflow/contract.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/workflow/definitions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/workflow/designer.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/workflow/engine.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/workflow/hooks.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/workflow/notices.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/workflow/operator.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/workflow/outbox.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/workflow/points.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/workflow/schema.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/workflow/traveler.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity/workflow/views.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity_python.egg-info/dependency_links.txt +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity_python.egg-info/entry_points.txt +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity_python.egg-info/requires.txt +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/src/velocity_python.egg-info/top_level.txt +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_access_error_403.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_action_names.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_activity_tracking_aborted_tx.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_amplify_redirects.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_analytics.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_asset_indexing.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_asset_references.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_assets_service.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_audit_log_confidential.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_audit_mixin.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_audit_registry_table_gate.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_audited_tables.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_authz.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_aws_package_hygiene.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_blob_store.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_builder_hardening.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_bulk_identifier_guard.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_business_objects.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_capabilities.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_capabilities_runtime.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_capability_catalog.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_capability_dependencies.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_capability_health_runtime.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_check_changelog.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_ci_gate.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_client_errors_mixin.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_client_input_contract_export.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_client_sql_boundary.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_client_table_gate_case_and_pointers.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_cognito_client_lazy.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_cognito_user_cache.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_column_tx_arg.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_commit_and_retry_safety.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_concurrency_safety.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_connection_resilience.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_context_enqueue_idempotency.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_context_flags_loader.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_context_job_descriptions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_context_queue_job.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_conv_combine.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_data_service_get_metadata.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_data_service_metadata_views.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_data_service_owner_scope.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_data_service_query_cap.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_data_service_renumber.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_data_service_row_number.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_data_service_save_as.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_data_service_security_gates.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_data_service_sync.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_db_audit_required.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_db_credentials_ssm_cascade.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_db_effective.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_db_integrity.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_db_lane_cli.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_db_lane_ensure.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_db_lane_user_data_fold.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_db_maintenance.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_db_pgddl_triggers.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_db_sync.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_db_tunnel.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_declared_column_types.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_decorators.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_delete_hook_fk_blocked.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_deploy_config_fields.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_deploy_engine.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_deploy_frontend_checks.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_deploy_operations_queue.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_deploy_policies.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_dirty_pipeline_consumer.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_dirty_pipeline_fast_path.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_dlq_constant.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_docs_snippets.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_email_processing.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_enqueue_metric_namespace.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_enqueue_send_failures.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_ensure_infrastructure.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_export_formula_injection.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_export_workbook.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_facets.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_facets_and_where.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_failures.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_fake_db_where_guard_parity.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_feature_flags.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_get_cognito_user_provider.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_hooks.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_http_handler_rollback.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_iconv_money_to_cents.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_identifier_injection_guard.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_identity.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_job_handler.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_job_lifecycle.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_job_record_guard.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_job_record_guard_postgres.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_job_results.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_json_columns.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_jsonb_dict_adapter.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_lambda_handler.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_lambda_handler_auth.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_lambda_handler_disabled_user.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_lambda_handler_masquerade.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_lambda_handler_user_cache.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_lazy_engine.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_masquerade_grant.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_merge_on_conflict.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_metadata.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_metadata_format.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_mirror.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_mirror_upsert_public.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_mixins_import.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_n_plus_one.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_nosql_dynamodb.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_nosql_memory.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_nosql_mongodb.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_nosql_redis.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_nosql_translation.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_nosql_where.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_observability.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_on_action_default.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_on_commit.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_ops.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_payment_audit_fixes.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_payment_authorizenet_adapter.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_payment_braintree_adapter.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_payment_braintree_mirror.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_payment_business_agnostic.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_payment_charge_reference.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_payment_extra_bounds.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_payment_lazy_imports.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_payment_mirror_empty_table.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_payment_profile_sorting.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_payment_stripe_ach.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_payment_stripe_adapter.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pdf.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_permissions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_permissions_actions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_permissions_notices.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_permissions_review.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_analytics.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_bulk_cache.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_capability_types.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_client_errors.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_ensure_infrastructure.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_get_tables.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_permissions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_pointer_joins.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_row_scope.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_search_export.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_settings.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_sync.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_sys_dirty_index.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_tiles.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pgserver_user_data.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_plaid_api.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_plaid_webhook.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_pointer_join_sql.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_postgres_initializer_config.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_postgres_py_type.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_prepared_statements.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_query_cache.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_query_missing_table_unlocked.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_raw_sql_prefix_policy.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_read_cache.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_readme_imports.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_record_event_postgres.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_record_event_transaction.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_request_log_withheld.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_response.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_restricted_direct_tables.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_result_returning.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_retry_side_effect_guard.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_return_default_safety.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_row_batch_nesting.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_row_batch_update.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_row_scoped_data_service.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_rules.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_rules_storage.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_runtime_auth_audit.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_runtime_continuation.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_runtime_jobs.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_runtime_limits.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_runtime_queue.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_runtime_queue_actions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_runtime_queue_defaults.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_runtime_security_log.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_runtime_site_time.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_runtime_tick.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_s3_bucket_config.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_s3_list_client_files.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_s3_upload.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_scheduler.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_schema_lock_config_other_backends.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_schema_migrations.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_search_paging_export.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_security_capability.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_security_events_table_gate.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_security_hardening.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_security_rate_limit_pg.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_server_cursor.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_session_control.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_single_autocommit_safety.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_single_session_capability.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_sms_twilio_signature.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_spreadsheet_functions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_sqlite_backend.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_sqlserver_encrypt_policy.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_sqs_per_record_transactions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_ssm_config.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_ssm_config_export_path.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_ssm_config_require.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_store_user_data.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_sys_dirty_index.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_sys_modified_count_postgres_demo.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_table_alter.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_table_claim.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_table_find_cache.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_tiles.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_transaction_class_wrapping.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_transaction_commit_and_ownership.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_transaction_edge_cases.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_tx_lifecycle_retry.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_tx_read_cache_and_bulk.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_unrestricted_where_guard.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_user_data.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_user_not_provisioned.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_v010_async_removed_sqlserver_read_only.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_v010_release_review.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_validation_override.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_where_clause_validation.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_workflow_actions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_workflow_contract.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_workflow_definitions.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_workflow_designer.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_workflow_engine.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_workflow_features.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_workflow_operator.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_workflow_postgres.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_workflow_projection.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_workflow_review.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_workflow_traveler.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_workflow_views.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_write_hook_create_flow.py +0 -0
- {velocity_python-0.10.1 → velocity_python-0.11.0}/tests/test_write_hook_empty_strings.py +0 -0
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import re
|
|
2
|
+
|
|
1
3
|
from velocity.db import exceptions
|
|
2
4
|
from velocity.db.core.decorators import return_default
|
|
3
5
|
|
|
6
|
+
_PLAIN_IDENT = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*$")
|
|
7
|
+
|
|
4
8
|
|
|
5
9
|
class Column:
|
|
6
10
|
"""
|
|
@@ -23,7 +27,21 @@ class Column:
|
|
|
23
27
|
call in a savepoint (``create``/``rollback``/``release``) on ``self.cursor()``.
|
|
24
28
|
Delegates to the owning table so the savepoint shares the table's cursor —
|
|
25
29
|
the same one ``self.tx.execute`` runs the statement on.
|
|
30
|
+
|
|
31
|
+
Public: a raw cursor marks the connection session-dirty (closed at
|
|
32
|
+
the end, never pooled), like ``tx.cursor()``.
|
|
26
33
|
"""
|
|
34
|
+
cursor = self._internal_cursor()
|
|
35
|
+
mark = getattr(self.tx, "mark_session_dirty", None)
|
|
36
|
+
if callable(mark):
|
|
37
|
+
mark()
|
|
38
|
+
return cursor
|
|
39
|
+
|
|
40
|
+
def _internal_cursor(self):
|
|
41
|
+
"""The owning table's cursor, without marking the connection."""
|
|
42
|
+
internal = getattr(type(self.table), "_internal_cursor", None)
|
|
43
|
+
if callable(internal):
|
|
44
|
+
return self.table._internal_cursor()
|
|
27
45
|
return self.table.cursor()
|
|
28
46
|
|
|
29
47
|
def __str__(self):
|
|
@@ -121,16 +139,28 @@ class Column:
|
|
|
121
139
|
self.tx.execute(sql, vals)
|
|
122
140
|
self.name = name
|
|
123
141
|
|
|
142
|
+
def _plain_name(self):
|
|
143
|
+
"""The column as a validated, lower-case identifier (it went into
|
|
144
|
+
the SELECT list and ORDER BY as written)."""
|
|
145
|
+
if not isinstance(self.name, str) or not _PLAIN_IDENT.match(self.name):
|
|
146
|
+
raise ValueError(f"Invalid column name: {self.name!r}")
|
|
147
|
+
return self.name.lower()
|
|
148
|
+
|
|
124
149
|
@return_default(default_factory=list, read=True)
|
|
125
150
|
def distinct(self, order="asc", qty=None):
|
|
126
151
|
"""
|
|
127
152
|
Returns the distinct values in this column, optionally ordered and/or limited in quantity.
|
|
153
|
+
``order`` is ``"asc"`` or ``"desc"``.
|
|
128
154
|
"""
|
|
155
|
+
name = self._plain_name()
|
|
156
|
+
direction = str(order).strip().upper()
|
|
157
|
+
if direction not in ("ASC", "DESC"):
|
|
158
|
+
raise ValueError(f"order must be 'asc' or 'desc', got {order!r}")
|
|
129
159
|
sql, vals = self.sql.select(
|
|
130
160
|
self.tx,
|
|
131
|
-
columns=f"distinct {
|
|
161
|
+
columns=f"distinct {name}",
|
|
132
162
|
table=self.table.name,
|
|
133
|
-
orderby=f"{
|
|
163
|
+
orderby=f"{name} {direction}",
|
|
134
164
|
qty=qty,
|
|
135
165
|
)
|
|
136
166
|
return self.tx.execute(sql, vals).as_simple_list().all()
|
|
@@ -140,7 +170,7 @@ class Column:
|
|
|
140
170
|
Returns the MAX() of this column, or 0 if table/column is missing.
|
|
141
171
|
"""
|
|
142
172
|
try:
|
|
143
|
-
qcol = self.sql.quote_identifier(self.
|
|
173
|
+
qcol = self.sql.quote_identifier(self._plain_name())
|
|
144
174
|
sql, vals = self.sql.select(
|
|
145
175
|
self.tx, columns=f"max({qcol})", table=self.table.name, where=where
|
|
146
176
|
)
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
from velocity.db import exceptions
|
|
2
|
+
from velocity.db.core.source_policy import refuse_read_only_source
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def _tx_cursor(tx):
|
|
6
|
+
"""The transaction's internal cursor (``Transaction._cursor``: not
|
|
7
|
+
marked session-dirty like the public ``tx.cursor()``); a test double
|
|
8
|
+
without it gets ``tx.cursor()``."""
|
|
9
|
+
if callable(getattr(type(tx), "_cursor", None)):
|
|
10
|
+
return tx._cursor()
|
|
11
|
+
return tx.cursor()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Database:
|
|
15
|
+
"""
|
|
16
|
+
Represents a database within a transaction context.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
def __init__(self, tx, name=None):
|
|
20
|
+
refuse_read_only_source(tx, "Database")
|
|
21
|
+
self.tx = tx
|
|
22
|
+
self.name = name or self._configured_name(tx)
|
|
23
|
+
self.sql = tx.engine.sql
|
|
24
|
+
|
|
25
|
+
@staticmethod
|
|
26
|
+
def _configured_name(tx):
|
|
27
|
+
"""The engine's database: ``dbname`` (psycopg 3 / PostgreSQL) or
|
|
28
|
+
``database`` (legacy, other dialects) in the config, else asked of
|
|
29
|
+
the server."""
|
|
30
|
+
config = tx.engine.config
|
|
31
|
+
if isinstance(config, dict):
|
|
32
|
+
name = config.get("dbname") or config.get("database")
|
|
33
|
+
if name:
|
|
34
|
+
return name
|
|
35
|
+
return tx.current_database()
|
|
36
|
+
|
|
37
|
+
def __str__(self):
|
|
38
|
+
return (
|
|
39
|
+
f"Engine: {self.tx.engine.sql.server}\n"
|
|
40
|
+
f"Database: {self.name}\n"
|
|
41
|
+
f"(db exists) {self.exists()}\n"
|
|
42
|
+
f"Tables: {len(self.tables)}\n"
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
def __enter__(self):
|
|
46
|
+
return self
|
|
47
|
+
|
|
48
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
49
|
+
if not exc_type:
|
|
50
|
+
self.close()
|
|
51
|
+
|
|
52
|
+
def close(self):
|
|
53
|
+
"""
|
|
54
|
+
Closes the cursor if it exists.
|
|
55
|
+
"""
|
|
56
|
+
try:
|
|
57
|
+
self._cursor.close()
|
|
58
|
+
except AttributeError:
|
|
59
|
+
pass
|
|
60
|
+
|
|
61
|
+
def cursor(self):
|
|
62
|
+
"""A raw driver cursor. Statements run on it bypass velocity's
|
|
63
|
+
bookkeeping, so the connection is marked session-dirty (closed at
|
|
64
|
+
the end, never pooled), like ``tx.cursor()``."""
|
|
65
|
+
cursor = self._internal_cursor()
|
|
66
|
+
mark = getattr(self.tx, "mark_session_dirty", None)
|
|
67
|
+
if callable(mark):
|
|
68
|
+
mark()
|
|
69
|
+
return cursor
|
|
70
|
+
|
|
71
|
+
def _internal_cursor(self):
|
|
72
|
+
"""
|
|
73
|
+
Lazy-initialize the cursor on first use.
|
|
74
|
+
"""
|
|
75
|
+
try:
|
|
76
|
+
return self._cursor
|
|
77
|
+
except AttributeError:
|
|
78
|
+
self._cursor = _tx_cursor(self.tx)
|
|
79
|
+
return self._cursor
|
|
80
|
+
|
|
81
|
+
def drop(self):
|
|
82
|
+
"""
|
|
83
|
+
Drops this database. Refused when the engine's schema is locked.
|
|
84
|
+
"""
|
|
85
|
+
self._refuse_when_locked("DROP")
|
|
86
|
+
sql, vals = self.tx.engine.sql.drop_database(self.name)
|
|
87
|
+
self.tx.execute(sql, vals, single=True, cursor=self._internal_cursor())
|
|
88
|
+
|
|
89
|
+
def create(self):
|
|
90
|
+
"""
|
|
91
|
+
Creates this database. Refused when the engine's schema is locked.
|
|
92
|
+
"""
|
|
93
|
+
self._refuse_when_locked("CREATE")
|
|
94
|
+
sql, vals = self.tx.engine.sql.create_database(self.name)
|
|
95
|
+
self.tx.execute(sql, vals, single=True, cursor=self._internal_cursor())
|
|
96
|
+
|
|
97
|
+
def exists(self):
|
|
98
|
+
"""
|
|
99
|
+
Returns True if the database exists, else False.
|
|
100
|
+
"""
|
|
101
|
+
sql, vals = self.sql.databases()
|
|
102
|
+
result = self.tx.execute(sql, vals, cursor=self._internal_cursor())
|
|
103
|
+
return bool(self.name in [x[0] for x in result.as_tuple()])
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def tables(self):
|
|
107
|
+
"""
|
|
108
|
+
Returns a list of 'schema.table' strings representing tables in this database.
|
|
109
|
+
"""
|
|
110
|
+
sql, vals = self.sql.tables()
|
|
111
|
+
result = self.tx.execute(sql, vals, cursor=self._internal_cursor())
|
|
112
|
+
return [f"{x[0]}.{x[1]}" for x in result.as_tuple()]
|
|
113
|
+
|
|
114
|
+
def reindex(self):
|
|
115
|
+
"""
|
|
116
|
+
Re-indexes this database. Refused when the engine's schema is locked.
|
|
117
|
+
"""
|
|
118
|
+
self._refuse_when_locked("REINDEX")
|
|
119
|
+
sql = f"REINDEX DATABASE {self.sql.quote_identifier(self.name)}"
|
|
120
|
+
vals = ()
|
|
121
|
+
self.tx.execute(sql, vals, cursor=self._internal_cursor())
|
|
122
|
+
|
|
123
|
+
def _refuse_when_locked(self, operation):
|
|
124
|
+
"""Maintenance (CREATE / DROP / VACUUM / REINDEX) never runs on an
|
|
125
|
+
engine whose schema is locked (production)."""
|
|
126
|
+
if self.tx.engine.schema_locked:
|
|
127
|
+
raise exceptions.DbSchemaLockedError(
|
|
128
|
+
f"Cannot {operation} database: the schema is locked."
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
def switch(self):
|
|
132
|
+
"""
|
|
133
|
+
Switches the parent transaction to this database.
|
|
134
|
+
|
|
135
|
+
Privileged operator API: it reaches any database the login can see
|
|
136
|
+
(``direct_connection``'s database check is not a boundary against
|
|
137
|
+
it). Never pass it a name that came from a request.
|
|
138
|
+
"""
|
|
139
|
+
self.tx.switch_to_database(self.name)
|
|
140
|
+
return self
|
|
141
|
+
|
|
142
|
+
def vacuum(self, analyze=True, full=False, reindex=True):
|
|
143
|
+
"""
|
|
144
|
+
Performs VACUUM on this database, optionally FULL, optionally ANALYZE,
|
|
145
|
+
optionally REINDEX.
|
|
146
|
+
|
|
147
|
+
Runs on its own direct connection to this database (``self.name``),
|
|
148
|
+
outside any transaction (PostgreSQL refuses VACUUM inside one), and
|
|
149
|
+
closes it: it never takes a pool slot.
|
|
150
|
+
"""
|
|
151
|
+
self._refuse_when_locked("VACUUM")
|
|
152
|
+
engine = self.tx.engine
|
|
153
|
+
conn = engine.direct_connection(database=self.name)
|
|
154
|
+
try:
|
|
155
|
+
# Postgres requires VACUUM to run outside a normal transaction block.
|
|
156
|
+
conn.autocommit = True
|
|
157
|
+
|
|
158
|
+
# Build up the VACUUM command
|
|
159
|
+
parts = ["VACUUM"]
|
|
160
|
+
if full:
|
|
161
|
+
parts.append("FULL")
|
|
162
|
+
if analyze:
|
|
163
|
+
parts.append("ANALYZE")
|
|
164
|
+
|
|
165
|
+
sql = " ".join(parts)
|
|
166
|
+
try:
|
|
167
|
+
with conn.cursor() as cur:
|
|
168
|
+
cur.execute(sql)
|
|
169
|
+
|
|
170
|
+
# Optionally REINDEX the database (PostgreSQL reindexes
|
|
171
|
+
# only the database it is connected to: this one).
|
|
172
|
+
if reindex:
|
|
173
|
+
cur.execute("SELECT current_database()")
|
|
174
|
+
current = cur.fetchone()[0]
|
|
175
|
+
sql = f"REINDEX DATABASE {self.sql.quote_identifier(current)}"
|
|
176
|
+
cur.execute(sql)
|
|
177
|
+
except Exception as e:
|
|
178
|
+
raise engine.process_error(e, sql)
|
|
179
|
+
finally:
|
|
180
|
+
try:
|
|
181
|
+
conn.close()
|
|
182
|
+
except Exception:
|
|
183
|
+
pass
|
|
@@ -81,7 +81,7 @@ def _primary_key_constraint(table):
|
|
|
81
81
|
return None
|
|
82
82
|
try:
|
|
83
83
|
sql, vals = builder(table.name)
|
|
84
|
-
row = table.tx.execute(sql, vals, cursor=table
|
|
84
|
+
row = table.tx.execute(sql, vals, cursor=_cursor_of(table)).as_tuple().one()
|
|
85
85
|
except Exception:
|
|
86
86
|
return None
|
|
87
87
|
if not row:
|
|
@@ -118,10 +118,10 @@ def _rollback_savepoint_safely(table, sp, error):
|
|
|
118
118
|
if isinstance(error, exceptions.DbConnectionError) or _connection_dead(table.tx):
|
|
119
119
|
return False
|
|
120
120
|
try:
|
|
121
|
-
table.tx.rollback_savepoint(sp, cursor=table
|
|
121
|
+
table.tx.rollback_savepoint(sp, cursor=_cursor_of(table))
|
|
122
122
|
# ROLLBACK TO keeps the savepoint open; release it so a long
|
|
123
123
|
# transaction with many swallowed errors does not pile them up.
|
|
124
|
-
table.tx.release_savepoint(sp, cursor=table
|
|
124
|
+
table.tx.release_savepoint(sp, cursor=_cursor_of(table), defer=True)
|
|
125
125
|
return True
|
|
126
126
|
except Exception as cleanup_error:
|
|
127
127
|
logger.warning(
|
|
@@ -150,10 +150,10 @@ def reset_id_on_dup_key(func):
|
|
|
150
150
|
@wraps(func)
|
|
151
151
|
def reset_decorator(self, *args, retries=0, **kwds):
|
|
152
152
|
max_retries = 10
|
|
153
|
-
sp = self.tx.create_savepoint(cursor=self
|
|
153
|
+
sp = self.tx.create_savepoint(cursor=_cursor_of(self), defer=True)
|
|
154
154
|
try:
|
|
155
155
|
result = func(self, *args, **kwds)
|
|
156
|
-
self.tx.release_savepoint(sp, cursor=self
|
|
156
|
+
self.tx.release_savepoint(sp, cursor=_cursor_of(self), defer=True)
|
|
157
157
|
return result
|
|
158
158
|
except exceptions.DbDuplicateKeyError as error:
|
|
159
159
|
if not _rollback_savepoint_safely(self, sp, error):
|
|
@@ -172,7 +172,9 @@ def reset_id_on_dup_key(func):
|
|
|
172
172
|
# collisions. Run the aggregate directly so any error surfaces
|
|
173
173
|
# instead of corrupting the sequence.
|
|
174
174
|
sql, vals = self.max("sys_id", sql_only=True)
|
|
175
|
-
current_max = self.tx.execute(
|
|
175
|
+
current_max = self.tx.execute(
|
|
176
|
+
sql, vals, cursor=_cursor_of(self)
|
|
177
|
+
).scalar()
|
|
176
178
|
self.set_sequence((current_max or 0) + 1)
|
|
177
179
|
return reset_decorator(self, *args, retries=retries + 1, **kwds)
|
|
178
180
|
raise _max_retries_error(error) from error
|
|
@@ -207,6 +209,16 @@ def _is_uncastable_input(error):
|
|
|
207
209
|
)
|
|
208
210
|
|
|
209
211
|
|
|
212
|
+
def _cursor_of(obj):
|
|
213
|
+
"""*obj*'s cursor for velocity's own statements: ``_internal_cursor()``
|
|
214
|
+
(the public ``cursor()`` marks the connection session-dirty), or
|
|
215
|
+
``cursor()`` on an object without it (a test double)."""
|
|
216
|
+
internal = getattr(type(obj), "_internal_cursor", None)
|
|
217
|
+
if callable(internal):
|
|
218
|
+
return obj._internal_cursor()
|
|
219
|
+
return obj.cursor()
|
|
220
|
+
|
|
221
|
+
|
|
210
222
|
def _first_line(value):
|
|
211
223
|
text = str(value or "")
|
|
212
224
|
return text.splitlines()[0] if text else ""
|
|
@@ -278,7 +290,7 @@ def return_default(
|
|
|
278
290
|
|
|
279
291
|
@wraps(func)
|
|
280
292
|
def wrapper(self, *args, **kwds):
|
|
281
|
-
sp = self.tx.create_savepoint(cursor=self
|
|
293
|
+
sp = self.tx.create_savepoint(cursor=_cursor_of(self), defer=True)
|
|
282
294
|
try:
|
|
283
295
|
result = func(self, *args, **kwds)
|
|
284
296
|
if result is None:
|
|
@@ -298,9 +310,15 @@ def return_default(
|
|
|
298
310
|
# its parameter values. Class, SQLSTATE and the driver's own
|
|
299
311
|
# first message line only.
|
|
300
312
|
sqlstate = getattr(e, "sqlstate", None)
|
|
313
|
+
# A velocity error whose text was redacted (process_error):
|
|
314
|
+
# its own first line, not the driver's unredacted one.
|
|
315
|
+
source = (
|
|
316
|
+
e
|
|
317
|
+
if getattr(e, "redacted", False) is True
|
|
318
|
+
else (getattr(e, "original", None) or e)
|
|
319
|
+
)
|
|
301
320
|
message = redact_data_exception_values(
|
|
302
|
-
getattr(e, "sqlstate", None),
|
|
303
|
-
_first_line(getattr(e, "original", None) or e),
|
|
321
|
+
getattr(e, "sqlstate", None), _first_line(source)
|
|
304
322
|
)
|
|
305
323
|
logger.log(
|
|
306
324
|
(
|
|
@@ -335,7 +353,7 @@ def return_default(
|
|
|
335
353
|
except Exception:
|
|
336
354
|
pass
|
|
337
355
|
return _make_default()
|
|
338
|
-
self.tx.release_savepoint(sp, cursor=self
|
|
356
|
+
self.tx.release_savepoint(sp, cursor=_cursor_of(self), defer=True)
|
|
339
357
|
return result
|
|
340
358
|
|
|
341
359
|
return wrapper
|
|
@@ -468,10 +486,10 @@ def create_missing(func):
|
|
|
468
486
|
def wrapper(self, *args, **kwds):
|
|
469
487
|
conflict_columns = _infer_conflict_columns(func, args, kwds)
|
|
470
488
|
|
|
471
|
-
sp = self.tx.create_savepoint(cursor=self
|
|
489
|
+
sp = self.tx.create_savepoint(cursor=_cursor_of(self), defer=True)
|
|
472
490
|
try:
|
|
473
491
|
result = func(self, *args, **kwds)
|
|
474
|
-
self.tx.release_savepoint(sp, cursor=self
|
|
492
|
+
self.tx.release_savepoint(sp, cursor=_cursor_of(self), defer=True)
|
|
475
493
|
return result
|
|
476
494
|
except exceptions.DbColumnMissingError as e:
|
|
477
495
|
if not _rollback_savepoint_safely(self, sp, e):
|
|
@@ -503,12 +521,12 @@ def create_missing(func):
|
|
|
503
521
|
self.tx.advisory_lock(f"velocity_ddl_{self.name}")
|
|
504
522
|
except Exception:
|
|
505
523
|
pass # advisory lock is best-effort (e.g. non-PostgreSQL)
|
|
506
|
-
sp2 = self.tx.create_savepoint(cursor=self
|
|
524
|
+
sp2 = self.tx.create_savepoint(cursor=_cursor_of(self))
|
|
507
525
|
try:
|
|
508
526
|
self.alter(data, mode="add")
|
|
509
|
-
self.tx.release_savepoint(sp2, cursor=self
|
|
527
|
+
self.tx.release_savepoint(sp2, cursor=_cursor_of(self))
|
|
510
528
|
except exceptions.DbObjectExistsError:
|
|
511
|
-
self.tx.rollback_savepoint(sp2, cursor=self
|
|
529
|
+
self.tx.rollback_savepoint(sp2, cursor=_cursor_of(self))
|
|
512
530
|
|
|
513
531
|
return func(self, *args, **kwds)
|
|
514
532
|
except exceptions.DbTableMissingError as e:
|
|
@@ -539,12 +557,12 @@ def create_missing(func):
|
|
|
539
557
|
self.tx.advisory_lock(f"velocity_ddl_{self.name}")
|
|
540
558
|
except Exception:
|
|
541
559
|
pass # advisory lock is best-effort
|
|
542
|
-
sp2 = self.tx.create_savepoint(cursor=self
|
|
560
|
+
sp2 = self.tx.create_savepoint(cursor=_cursor_of(self))
|
|
543
561
|
try:
|
|
544
562
|
self.create(data)
|
|
545
|
-
self.tx.release_savepoint(sp2, cursor=self
|
|
563
|
+
self.tx.release_savepoint(sp2, cursor=_cursor_of(self))
|
|
546
564
|
except exceptions.DbObjectExistsError:
|
|
547
|
-
self.tx.rollback_savepoint(sp2, cursor=self
|
|
565
|
+
self.tx.rollback_savepoint(sp2, cursor=_cursor_of(self))
|
|
548
566
|
|
|
549
567
|
if conflict_columns:
|
|
550
568
|
self.create_index(conflict_columns, unique=True)
|