piccolo 1.23.0__tar.gz → 1.24.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.
- {piccolo-1.23.0 → piccolo-1.24.0}/PKG-INFO +1 -1
- piccolo-1.24.0/piccolo/__init__.py +1 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/sql_shell/commands/run.py +13 -14
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/tables.py +3 -1
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/column_types.py +1 -1
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/objects.py +5 -7
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo.egg-info/PKG-INFO +1 -1
- piccolo-1.24.0/tests/apps/sql_shell/commands/test_run.py +38 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_objects.py +31 -0
- piccolo-1.23.0/piccolo/__init__.py +0 -1
- piccolo-1.23.0/tests/apps/sql_shell/commands/test_run.py +0 -14
- {piccolo-1.23.0 → piccolo-1.24.0}/LICENSE +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/README.md +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/app/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/app/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/app/commands/new.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/app/commands/show_all.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/app/commands/templates/piccolo_app.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/app/commands/templates/tables.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/app/piccolo_app.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/new.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/README.md.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_blacksheep_app.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_esmerald_app.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_falcon_app.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_fastapi_app.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_lilya_app.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_litestar_app.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_quart_app.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_sanic_app.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_starlette_app.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/app.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/conftest.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/__init__.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/_blacksheep_endpoints.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/_esmerald_endpoints.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/_falcon_endpoints.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/_lilya_endpoints.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/_litestar_endpoints.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/_quart_endpoints.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/_sanic_endpoints.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/_starlette_endpoints.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/endpoints.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/piccolo_app.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/piccolo_migrations/README.md +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/tables.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/templates/base.html.jinja_raw +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/templates/home.html.jinja_raw +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/main.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/piccolo_conf.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/piccolo_conf_test.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/requirements.txt.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/static/favicon.ico +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/static/main.css +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/piccolo_app.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/fixtures/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/fixtures/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/fixtures/commands/dump.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/fixtures/commands/load.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/fixtures/commands/shared.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/fixtures/piccolo_app.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/meta/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/meta/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/meta/commands/version.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/meta/piccolo_app.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/auto/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/auto/diffable_table.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/auto/migration_manager.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/auto/operations.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/auto/schema_differ.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/auto/schema_snapshot.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/auto/serialisation.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/auto/serialisation_legacy.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/commands/backwards.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/commands/base.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/commands/check.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/commands/clean.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/commands/forwards.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/commands/new.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/commands/templates/migration.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/piccolo_app.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/tables.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/playground/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/playground/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/playground/commands/run.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/playground/piccolo_app.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/project/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/project/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/project/commands/new.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/project/commands/templates/piccolo_conf.py.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/project/piccolo_app.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/schema/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/schema/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/schema/commands/exceptions.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/schema/commands/generate.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/schema/commands/graph.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/schema/commands/templates/graphviz.dot.jinja +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/schema/piccolo_app.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/shell/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/shell/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/shell/commands/run.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/shell/piccolo_app.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/sql_shell/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/sql_shell/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/sql_shell/piccolo_app.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/tester/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/tester/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/tester/commands/run.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/tester/piccolo_app.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/commands/change_password.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/commands/change_permissions.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/commands/create.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/commands/list.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/piccolo_app.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/piccolo_migrations/2019-11-14T21-52-21.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/piccolo_migrations/2020-06-11T21-38-55.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/piccolo_migrations/2021-04-30T16-14-15.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/piccolo_migrations/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/base.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/choices.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/combination.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/defaults/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/defaults/base.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/defaults/date.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/defaults/interval.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/defaults/time.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/defaults/timestamp.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/defaults/timestamptz.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/defaults/uuid.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/indexes.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/m2m.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/operators/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/operators/base.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/operators/comparison.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/operators/math.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/operators/string.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/readable.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/columns/reference.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/conf/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/conf/apps.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/custom_types.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/engine/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/engine/base.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/engine/cockroach.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/engine/exceptions.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/engine/finder.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/engine/postgres.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/engine/sqlite.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/main.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/py.typed +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/base.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/functions/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/functions/aggregate.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/functions/base.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/functions/datetime.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/functions/math.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/functions/string.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/functions/type_conversion.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/alter.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/count.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/create.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/create_index.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/delete.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/drop_index.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/exists.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/indexes.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/insert.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/raw.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/refresh.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/select.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/table_exists.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/methods/update.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/mixins.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/operators/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/operators/json.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/query/proxy.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/querystring.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/schema.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/table.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/table_reflection.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/testing/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/testing/model_builder.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/testing/random_builder.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/testing/test_case.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/dictionary.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/encoding.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/graphlib/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/graphlib/_graphlib.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/lazy_loader.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/list.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/naming.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/objects.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/printing.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/pydantic.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/repr.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/sql_values.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/sync.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo/utils/warnings.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo.egg-info/SOURCES.txt +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo.egg-info/dependency_links.txt +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo.egg-info/entry_points.txt +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo.egg-info/requires.txt +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/piccolo.egg-info/top_level.txt +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/profiling/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/profiling/run_profile.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/pyproject.toml +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/setup.cfg +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/setup.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/app/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/app/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/app/commands/test_new.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/app/commands/test_show_all.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/asgi/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/asgi/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/asgi/commands/test_new.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/fixtures/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/fixtures/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/fixtures/commands/test_dump_load.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/fixtures/commands/test_shared.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/meta/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/meta/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/meta/commands/test_version.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/auto/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/auto/integration/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/auto/integration/test_migrations.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/auto/test_diffable_table.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/auto/test_migration_manager.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/auto/test_schema_differ.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/auto/test_schema_snapshot.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/auto/test_serialisation.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/commands/test_base.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/commands/test_check.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/commands/test_clean.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/commands/test_forwards_backwards.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/commands/test_migrations/2020-03-31T20-38-22.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/commands/test_migrations/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/commands/test_new.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/migrations/test_migration.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/project/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/project/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/project/commands/test_new.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/schema/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/shell/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/shell/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/shell/commands/test_run.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/sql_shell/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/sql_shell/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/tester/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/user/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/user/commands/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/user/commands/test_change_password.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/user/commands/test_change_permissions.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/user/commands/test_create.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/user/commands/test_list.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/apps/user/test_tables.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/m2m/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/m2m/base.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/m2m/test_m2m.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/m2m/test_m2m_schema.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_array.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_base.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_bigint.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_boolean.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_bytea.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_choices.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_combination.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_date.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_db_column_name.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_defaults.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_double_precision.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_get_sql_value.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_integer.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_interval.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_json.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_jsonb.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_numeric.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_primary_key.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_readable.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_real.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_reference.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_reserved_column_names.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_smallint.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_time.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_timestamp.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_timestamptz.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_uuid.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/columns/test_varchar.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/conf/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/conf/example.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/conf/test_apps.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/engine/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/engine/test_extra_nodes.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/engine/test_logging.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/engine/test_nested_transaction.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/engine/test_pool.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/engine/test_transaction.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/engine/test_version_parsing.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/example_apps/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/example_apps/mega/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/example_apps/mega/piccolo_app.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/example_apps/mega/piccolo_migrations/2021-09-20T21-23-25-698988.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/example_apps/mega/piccolo_migrations/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/example_apps/mega/tables.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/example_apps/music/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/example_apps/music/piccolo_app.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/example_apps/music/tables.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/example_apps/music/tables_detailed.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/functions/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/functions/base.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/functions/test_datetime.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/functions/test_functions.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/functions/test_math.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/functions/test_string.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/functions/test_type_conversion.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/mixins/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/mixins/test_columns_delegate.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/mixins/test_order_by_delegate.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/operators/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/operators/test_json.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/test_await.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/test_camelcase.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/test_freeze.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/test_gather.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/test_querystring.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/query/test_slots.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/instance/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/instance/test_create.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/instance/test_get_related.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/instance/test_get_related_readable.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/instance/test_instantiate.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/instance/test_remove.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/instance/test_save.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/instance/test_to_dict.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_all_columns.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_alter.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_batch.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_callback.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_constructor.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_count.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_create.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_create_db_tables.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_create_table_class.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_delete.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_drop_db_tables.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_exists.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_from_dict.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_indexes.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_inheritance.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_insert.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_join.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_join_on.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_metaclass.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_output.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_raw.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_ref.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_refresh.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_repr.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_select.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_str.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_table_exists.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_update.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/table/test_update_self.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/test_main.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/test_schema.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/testing/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/testing/test_model_builder.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/testing/test_random_builder.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/testing/test_test_case.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/utils/__init__.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/utils/test_dictionary.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/utils/test_encoding.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/utils/test_lazy_loader.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/utils/test_list.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/utils/test_naming.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/utils/test_printing.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/utils/test_pydantic.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/utils/test_sql_values.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/utils/test_sync.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/utils/test_table_reflection.py +0 -0
- {piccolo-1.23.0 → piccolo-1.24.0}/tests/utils/test_warnings.py +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
__VERSION__ = "1.24.0"
|
@@ -28,24 +28,23 @@ def run() -> None:
|
|
28
28
|
|
29
29
|
args = ["psql"]
|
30
30
|
|
31
|
-
|
32
|
-
port = engine.config.get("port")
|
33
|
-
user = engine.config.get("user")
|
34
|
-
password = engine.config.get("password")
|
35
|
-
database = engine.config.get("database")
|
31
|
+
config = engine.config
|
36
32
|
|
37
|
-
if
|
38
|
-
args += [
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
33
|
+
if dsn := config.get("dsn"):
|
34
|
+
args += [dsn]
|
35
|
+
else:
|
36
|
+
if user := config.get("user"):
|
37
|
+
args += ["-U", user]
|
38
|
+
if host := config.get("host"):
|
39
|
+
args += ["-h", host]
|
40
|
+
if port := config.get("port"):
|
41
|
+
args += ["-p", str(port)]
|
42
|
+
if database := config.get("database"):
|
43
|
+
args += [database]
|
45
44
|
|
46
45
|
sigint_handler = signal.getsignal(signal.SIGINT)
|
47
46
|
subprocess_env = os.environ.copy()
|
48
|
-
if password:
|
47
|
+
if password := config.get("password"):
|
49
48
|
subprocess_env["PGPASSWORD"] = str(password)
|
50
49
|
try:
|
51
50
|
# Allow SIGINT to pass to psql to abort queries.
|
@@ -202,7 +202,9 @@ class BaseUser(Table, tablename="piccolo_user"):
|
|
202
202
|
The id of the user if a match is found, otherwise ``None``.
|
203
203
|
|
204
204
|
"""
|
205
|
-
if
|
205
|
+
if (max_username_length := cls.username.length) and len(
|
206
|
+
username
|
207
|
+
) > max_username_length:
|
206
208
|
logger.warning("Excessively long username provided.")
|
207
209
|
return None
|
208
210
|
|
@@ -65,22 +65,20 @@ class GetOrCreate(
|
|
65
65
|
instance._was_created = False
|
66
66
|
return instance
|
67
67
|
|
68
|
-
|
68
|
+
data = {**self.defaults}
|
69
69
|
|
70
70
|
# If it's a complex `where`, there can be several column values to
|
71
71
|
# extract e.g. (Band.name == 'Pythonistas') & (Band.popularity == 1000)
|
72
72
|
if isinstance(self.where, Where):
|
73
|
-
|
74
|
-
instance,
|
75
|
-
self.where.column._meta.name, # type: ignore
|
76
|
-
self.where.value, # type: ignore
|
77
|
-
)
|
73
|
+
data[self.where.column] = self.where.value
|
78
74
|
elif isinstance(self.where, And):
|
79
75
|
for column, value in self.where.get_column_values().items():
|
80
76
|
if len(column._meta.call_chain) == 0:
|
81
77
|
# Make sure we only set the value if the column belongs
|
82
78
|
# to this table.
|
83
|
-
|
79
|
+
data[column] = value
|
80
|
+
|
81
|
+
instance = self.table_class(_data=data)
|
84
82
|
|
85
83
|
await instance.save().run(node=node, in_pool=in_pool)
|
86
84
|
|
@@ -0,0 +1,38 @@
|
|
1
|
+
from unittest import TestCase
|
2
|
+
from unittest.mock import MagicMock, patch
|
3
|
+
|
4
|
+
from piccolo.apps.sql_shell.commands.run import run
|
5
|
+
from tests.base import postgres_only, sqlite_only
|
6
|
+
|
7
|
+
|
8
|
+
class TestRun(TestCase):
|
9
|
+
@postgres_only
|
10
|
+
@patch("piccolo.apps.sql_shell.commands.run.subprocess")
|
11
|
+
def test_psql(self, subprocess: MagicMock):
|
12
|
+
"""
|
13
|
+
Make sure psql was called correctly.
|
14
|
+
"""
|
15
|
+
run()
|
16
|
+
self.assertTrue(subprocess.run.called)
|
17
|
+
|
18
|
+
assert subprocess.run.call_args.args[0] == [
|
19
|
+
"psql",
|
20
|
+
"-U",
|
21
|
+
"postgres",
|
22
|
+
"-h",
|
23
|
+
"localhost",
|
24
|
+
"-p",
|
25
|
+
"5432",
|
26
|
+
"piccolo",
|
27
|
+
]
|
28
|
+
|
29
|
+
@sqlite_only
|
30
|
+
@patch("piccolo.apps.sql_shell.commands.run.subprocess")
|
31
|
+
def test_sqlite3(self, subprocess: MagicMock):
|
32
|
+
"""
|
33
|
+
Make sure sqlite3 was called correctly.
|
34
|
+
"""
|
35
|
+
run()
|
36
|
+
self.assertTrue(subprocess.run.called)
|
37
|
+
|
38
|
+
assert subprocess.run.call_args.args[0] == ["sqlite3", "test.sqlite"]
|
@@ -1,3 +1,5 @@
|
|
1
|
+
from piccolo.columns.column_types import ForeignKey
|
2
|
+
from piccolo.testing.test_case import AsyncTableTest
|
1
3
|
from tests.base import DBTestCase, engines_only, sqlite_only
|
2
4
|
from tests.example_apps.music.tables import Band, Manager
|
3
5
|
|
@@ -268,3 +270,32 @@ class TestGetOrCreate(DBTestCase):
|
|
268
270
|
self.assertIsInstance(band.manager, Manager)
|
269
271
|
self.assertEqual(band.name, "New Band 2")
|
270
272
|
self.assertEqual(band.manager.name, "Guido")
|
273
|
+
|
274
|
+
|
275
|
+
class BandNotNull(Band, tablename="band"):
|
276
|
+
manager = ForeignKey(Manager, null=False)
|
277
|
+
|
278
|
+
|
279
|
+
class TestGetOrCreateNotNull(AsyncTableTest):
|
280
|
+
|
281
|
+
tables = [BandNotNull, Manager]
|
282
|
+
|
283
|
+
async def test_not_null(self):
|
284
|
+
"""
|
285
|
+
There was a bug where `get_or_create` would fail for columns with
|
286
|
+
`default=None` and `null=False`, even if the value for those columns
|
287
|
+
was specified in the where clause.
|
288
|
+
|
289
|
+
https://github.com/piccolo-orm/piccolo/issues/1152
|
290
|
+
|
291
|
+
"""
|
292
|
+
|
293
|
+
manager = Manager({Manager.name: "Test"})
|
294
|
+
await manager.save()
|
295
|
+
|
296
|
+
self.assertIsInstance(
|
297
|
+
await BandNotNull.objects().get_or_create(
|
298
|
+
BandNotNull.manager == manager
|
299
|
+
),
|
300
|
+
BandNotNull,
|
301
|
+
)
|
@@ -1 +0,0 @@
|
|
1
|
-
__VERSION__ = "1.23.0"
|
@@ -1,14 +0,0 @@
|
|
1
|
-
from unittest import TestCase
|
2
|
-
from unittest.mock import MagicMock, patch
|
3
|
-
|
4
|
-
from piccolo.apps.sql_shell.commands.run import run
|
5
|
-
|
6
|
-
|
7
|
-
class TestRun(TestCase):
|
8
|
-
@patch("piccolo.apps.sql_shell.commands.run.subprocess")
|
9
|
-
def test_run(self, subprocess: MagicMock):
|
10
|
-
"""
|
11
|
-
A simple test to make sure it executes without raising any exceptions.
|
12
|
-
"""
|
13
|
-
run()
|
14
|
-
self.assertTrue(subprocess.run.called)
|
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
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_blacksheep_app.py.jinja
RENAMED
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_esmerald_app.py.jinja
RENAMED
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_falcon_app.py.jinja
RENAMED
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_fastapi_app.py.jinja
RENAMED
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_lilya_app.py.jinja
RENAMED
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_litestar_app.py.jinja
RENAMED
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_quart_app.py.jinja
RENAMED
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_sanic_app.py.jinja
RENAMED
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/_starlette_app.py.jinja
RENAMED
File without changes
|
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/conftest.py.jinja
RENAMED
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/__init__.py.jinja
RENAMED
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
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/endpoints.py.jinja
RENAMED
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/piccolo_app.py.jinja
RENAMED
File without changes
|
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/home/tables.py.jinja
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/piccolo_conf.py.jinja
RENAMED
File without changes
|
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/requirements.txt.jinja
RENAMED
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/asgi/commands/templates/app/static/favicon.ico
RENAMED
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
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/migrations/commands/templates/migration.py.jinja
RENAMED
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
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/project/commands/templates/piccolo_conf.py.jinja
RENAMED
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
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/piccolo_migrations/2019-11-14T21-52-21.py
RENAMED
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/piccolo_migrations/2020-06-11T21-38-55.py
RENAMED
File without changes
|
{piccolo-1.23.0 → piccolo-1.24.0}/piccolo/apps/user/piccolo_migrations/2021-04-30T16-14-15.py
RENAMED
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
|