rococo 1.3.0__tar.gz → 1.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rococo-1.3.0 → rococo-1.3.1}/PKG-INFO +1 -1
- {rococo-1.3.0 → rococo-1.3.1}/rococo/data/postgresql.py +17 -3
- {rococo-1.3.0 → rococo-1.3.1}/rococo.egg-info/PKG-INFO +1 -1
- {rococo-1.3.0 → rococo-1.3.1}/setup.py +1 -1
- {rococo-1.3.0 → rococo-1.3.1}/LICENSE +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/README.md +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/auth/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/auth/tokens.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/config/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/config/config.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/data/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/data/base.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/data/dynamodb.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/data/mongodb.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/data/mysql.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/data/surrealdb.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/emailing/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/emailing/base.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/emailing/config.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/emailing/enums.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/emailing/factory.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/emailing/mailjet.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/emailing/ses.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/faxing/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/faxing/base.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/faxing/config.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/faxing/enums.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/faxing/factory.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/faxing/ifax.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/messaging/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/messaging/base.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/messaging/rabbitmq.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/messaging/sqs.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/common/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/common/cli_base.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/common/migration_base.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/common/migration_runner.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/common/migration_template.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/common/sql_migration_base.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/mongo/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/mongo/cli.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/mongo/migration.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/mysql/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/mysql/cli.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/mysql/migration.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/postgres/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/postgres/cli.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/migrations/postgres/migration.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/email.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/login_method.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/organization.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/otp_method.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/person.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/person_organization_role.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/recovery_code.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/surrealdb/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/surrealdb/email.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/surrealdb/login_method.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/surrealdb/organization.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/surrealdb/otp_method.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/surrealdb/person.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/surrealdb/person_organization_role.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/surrealdb/surreal_versioned_model.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/models/versioned_model.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/plugins/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/plugins/pooled_connection.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/base_repository.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/dynamodb/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/dynamodb/dynamodb_repository.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/mongodb/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/mongodb/mongodb_repository.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/mysql/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/mysql/mysql_repository.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/mysql/organization_repository.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/postgresql/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/postgresql/postgresql_repository.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/surrealdb/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/surrealdb/organization_repository.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/surrealdb/person_organization_role_repository.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/surrealdb/surreal_db_repository.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/sms/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/sms/base.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/sms/config.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/sms/enums.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/sms/factory.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo/sms/twilio.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo.egg-info/SOURCES.txt +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo.egg-info/dependency_links.txt +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo.egg-info/entry_points.txt +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo.egg-info/requires.txt +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/rococo.egg-info/top_level.txt +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/setup.cfg +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/base_repository_test.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/config_test.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/database-integration/__init__.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/database-integration/conftest.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/database-integration/test_dynamodb_integration.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/database-integration/test_models.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/database-integration/test_mongodb_integration.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/database-integration/test_mysql_integration.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/database-integration/test_postgres_integration.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/database-integration/test_surrealdb_integration.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/dynamodb_repository_test.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/migration_cli_base_test.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/migration_runner_test.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/model_test.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/mongodb_repository_test.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/mysql_repository_test.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/postgre_repository_test.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/sql_migration_base_test.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/surrealdb_repository_test.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/test_calculated_properties_fix.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/test_faxing.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/test_mailjet_addresses.py +0 -0
- {rococo-1.3.0 → rococo-1.3.1}/tests/test_non_versioned_model.py +0 -0
|
@@ -11,7 +11,18 @@ from rococo.data.base import DbAdapter
|
|
|
11
11
|
class PostgreSQLAdapter(DbAdapter):
|
|
12
12
|
"""PostgreSQL adapter for interacting with PostgreSQL."""
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
def __init__(
|
|
16
|
+
self,
|
|
17
|
+
host: str,
|
|
18
|
+
port: int,
|
|
19
|
+
user: str,
|
|
20
|
+
password: str,
|
|
21
|
+
database: str,
|
|
22
|
+
connection_resolver: Optional[Callable] = None,
|
|
23
|
+
connection_closer: Optional[Callable] = None,
|
|
24
|
+
connect_kwargs: Optional[dict] = None,
|
|
25
|
+
):
|
|
15
26
|
self._host = host
|
|
16
27
|
self._port = port
|
|
17
28
|
self._user = user
|
|
@@ -19,7 +30,8 @@ class PostgreSQLAdapter(DbAdapter):
|
|
|
19
30
|
self._database = database
|
|
20
31
|
self._connection = None
|
|
21
32
|
self._cursor = None
|
|
22
|
-
self._table_columns_cache = {}
|
|
33
|
+
self._table_columns_cache = {}
|
|
34
|
+
self._connect_kwargs = connect_kwargs or {}
|
|
23
35
|
|
|
24
36
|
if connection_resolver is None:
|
|
25
37
|
self._connection_resolver = psycopg2.connect
|
|
@@ -28,6 +40,7 @@ class PostgreSQLAdapter(DbAdapter):
|
|
|
28
40
|
|
|
29
41
|
self._connection_closer = connection_closer
|
|
30
42
|
|
|
43
|
+
|
|
31
44
|
def __enter__(self):
|
|
32
45
|
"""Context manager entry point for creating DB connection."""
|
|
33
46
|
self._connection = self.connect
|
|
@@ -60,7 +73,8 @@ class PostgreSQLAdapter(DbAdapter):
|
|
|
60
73
|
port=self._port,
|
|
61
74
|
user=self._user,
|
|
62
75
|
password=self._password,
|
|
63
|
-
database=self._database
|
|
76
|
+
database=self._database,
|
|
77
|
+
**self._connect_kwargs
|
|
64
78
|
)
|
|
65
79
|
|
|
66
80
|
def _call_cursor(self, function_name, *args, **kwargs):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rococo-1.3.0 → rococo-1.3.1}/rococo/repositories/surrealdb/person_organization_role_repository.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
|