api-foundry-query-engine 0.8.75__tar.gz → 0.8.77__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.
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/PKG-INFO +1 -1
- api_foundry_query_engine-0.8.77/api_foundry_query_engine/__init__.py +1 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/connectors/connection_factory.py +20 -10
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/dao/sql_query_handler.py +1 -1
- api_foundry_query_engine-0.8.75/api_foundry_query_engine/__init__.py +0 -1
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/.gitignore +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/LICENSE +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/.pre-commit-config.yaml +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/adapters/adapter.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/adapters/gateway_adapter.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/connectors/connection.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/connectors/postgres_connection.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/dao/batch_operation_handler.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/dao/dao.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/dao/operation_dao.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/dao/sql_custom_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/dao/sql_delete_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/dao/sql_insert_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/dao/sql_restore_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/dao/sql_select_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/dao/sql_subselect_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/dao/sql_update_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/lambda_handler.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/operation.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/services/service.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/services/transactional_service.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/utils/api_model.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/utils/app_exception.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/utils/claims_check.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/utils/dependency_resolver.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/utils/logger.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/utils/reference_resolver.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/api_foundry_query_engine/utils/token_decoder.py +0 -0
- {api_foundry_query_engine-0.8.75 → api_foundry_query_engine-0.8.77}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: api-foundry-query-engine
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.77
|
|
4
4
|
Summary: The AWS lambda service handler use by the `api_foundry` project is a powerful tool designed to automate the deployment of REST APIs on AWS using Lambda services to access and interact with relational databases (RDBMS). This project leverages the OpenAPI specification to define and manage the APIs
|
|
5
5
|
Project-URL: Documentation, https://github.com/DanRepik/api-foundry
|
|
6
6
|
Project-URL: Source, https://github.com/DanRepik/api-foundry
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.8.77"
|
|
@@ -35,17 +35,27 @@ class ConnectionFactory:
|
|
|
35
35
|
log.info("database: %s", database)
|
|
36
36
|
db_config = self.db_config_map.get(database)
|
|
37
37
|
if not db_config:
|
|
38
|
-
#
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if
|
|
46
|
-
db_config = self.
|
|
38
|
+
# A <DATABASE>_DSN config value (e.g. CONTRACT_DB_DSN) skips
|
|
39
|
+
# Secrets Manager entirely. This matters for a Lambda that's
|
|
40
|
+
# VPC-attached for private database access but has no route
|
|
41
|
+
# to the Secrets Manager API (no NAT gateway, no interface
|
|
42
|
+
# endpoint) -- the SECRETS/get_secret_value path would just
|
|
43
|
+
# hang. PostgresConnection already accepts a raw "dsn" key.
|
|
44
|
+
dsn = self.config.get(f"{database.upper()}_DSN")
|
|
45
|
+
if dsn:
|
|
46
|
+
db_config = {"engine": self.config.get(f"{database.upper()}_ENGINE", "postgres"), "dsn": dsn}
|
|
47
47
|
else:
|
|
48
|
-
|
|
48
|
+
# Use config dict for secrets
|
|
49
|
+
secrets_map = self.config.get("SECRETS", {})
|
|
50
|
+
if isinstance(secrets_map, str):
|
|
51
|
+
secrets_map = json.loads(secrets_map)
|
|
52
|
+
secret_name = secrets_map.get(database)
|
|
53
|
+
log.debug("secret_name: %s", secret_name)
|
|
54
|
+
|
|
55
|
+
if secret_name:
|
|
56
|
+
db_config = self.__get_secret(secret_name)
|
|
57
|
+
else:
|
|
58
|
+
raise ValueError(f"Secret not found for database: {database}")
|
|
49
59
|
|
|
50
60
|
engine = db_config.get("engine")
|
|
51
61
|
if not engine:
|
|
@@ -376,7 +376,7 @@ class SQLQueryHandler:
|
|
|
376
376
|
]
|
|
377
377
|
sql = f"{column} {'NOT ' if operand == 'not-in' else ''}IN ({', '.join(assignments)})" # noqa E501
|
|
378
378
|
elif operand in ["like", "not-like"]:
|
|
379
|
-
sql = f"{column} {'NOT ' if operand == 'not-like' else ''}LIKE {self.placeholder(property, str(placeholder_name))}"
|
|
379
|
+
sql = f"{column} {'NOT ' if operand == 'not-like' else ''}LIKE {self.placeholder(property, str(placeholder_name))}" # noqa E501
|
|
380
380
|
else:
|
|
381
381
|
sql = f"{column} {operand} {self.placeholder(property, str(placeholder_name))}"
|
|
382
382
|
return sql
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.8.75"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|