api-foundry-query-engine 0.8.7__tar.gz → 0.8.9__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.7 → api_foundry_query_engine-0.8.9}/PKG-INFO +1 -1
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/dao/sql_query_handler.py +1 -1
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/dao/sql_select_query_handler.py +2 -2
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/dao/sql_subselect_query_handler.py +1 -1
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/utils/api_model.py +3 -2
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/pyproject.toml +1 -1
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/.gitignore +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/LICENSE +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/.pre-commit-config.yaml +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/__init__.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/adapters/adapter.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/adapters/case_change_adapter.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/adapters/gateway_adapter.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/adapters/security_adapter.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/connectors/athena_connector.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/connectors/connection.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/connectors/connection_factory.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/connectors/oracle_connector.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/connectors/postgres_connection.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/dao/dao.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/dao/operation_dao.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/dao/sql_custom_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/dao/sql_delete_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/dao/sql_insert_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/dao/sql_update_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/lambda_handler.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/operation.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/services/security_service.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/services/service.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/services/transactional_service.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/utils/app_exception.py +0 -0
- {api_foundry_query_engine-0.8.7 → api_foundry_query_engine-0.8.9}/api_foundry_query_engine/utils/logger.py +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.9
|
|
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
|
|
@@ -346,7 +346,7 @@ class SQLSchemaQueryHandler(SQLQueryHandler):
|
|
|
346
346
|
|
|
347
347
|
@property
|
|
348
348
|
def table_expression(self) -> str:
|
|
349
|
-
return self.schema_object.
|
|
349
|
+
return self.schema_object.quailified_name or ""
|
|
350
350
|
|
|
351
351
|
@property
|
|
352
352
|
def selection_results(self) -> Dict:
|
|
@@ -99,7 +99,7 @@ class SQLSelectSchemaQueryHandler(SQLSchemaQueryHandler):
|
|
|
99
99
|
if child_prefix in self.active_prefixes:
|
|
100
100
|
joins.append(
|
|
101
101
|
"INNER JOIN "
|
|
102
|
-
+ str(relation.child_schema_object.
|
|
102
|
+
+ str(relation.child_schema_object.quailified_name)
|
|
103
103
|
+ " AS "
|
|
104
104
|
+ child_prefix
|
|
105
105
|
+ " ON "
|
|
@@ -113,7 +113,7 @@ class SQLSelectSchemaQueryHandler(SQLSchemaQueryHandler):
|
|
|
113
113
|
)
|
|
114
114
|
|
|
115
115
|
return (
|
|
116
|
-
str(self.schema_object.
|
|
116
|
+
str(self.schema_object.quailified_name)
|
|
117
117
|
+ " AS "
|
|
118
118
|
+ str(self.prefix_map[str(self.schema_object.api_name)])
|
|
119
119
|
+ (f" {' '.join(joins)}" if len(joins) > 0 else "")
|
|
@@ -53,7 +53,7 @@ class SQLSubselectSchemaQueryHandler(SQLSelectSchemaQueryHandler):
|
|
|
53
53
|
|
|
54
54
|
sql = (
|
|
55
55
|
f"SELECT {self.select_list} "
|
|
56
|
-
+ f"FROM {self.relation.child_schema_object.
|
|
56
|
+
+ f"FROM {self.relation.child_schema_object.quailified_name} "
|
|
57
57
|
+ f"WHERE {self.relation.child_property} "
|
|
58
58
|
+ f"IN ( SELECT {self.relation.parent_property} "
|
|
59
59
|
+ f"FROM {self.parent_generator.table_expression}"
|
|
@@ -171,9 +171,10 @@ class SchemaObject:
|
|
|
171
171
|
)
|
|
172
172
|
self._primary_key: str = str(data.get("primary_key"))
|
|
173
173
|
self.permissions = data.get("permissions")
|
|
174
|
+
self.quailified_name = f"{self.database}.{self.table_name}" if self.database else self.table_name
|
|
174
175
|
|
|
175
176
|
def __repr__(self):
|
|
176
|
-
return f"SchemaObject(table_name={self.
|
|
177
|
+
return f"SchemaObject(table_name={self.quailified_name}, primary_key={self.primary_key})"
|
|
177
178
|
|
|
178
179
|
@property
|
|
179
180
|
def primary_key(self):
|
|
@@ -239,5 +240,5 @@ def set_api_model(engine_config: Mapping[str, str]):
|
|
|
239
240
|
with open(
|
|
240
241
|
os.environ.get("API_SPEC", "/var/task/api_spec.yaml"), "r"
|
|
241
242
|
) as file:
|
|
242
|
-
log.info("Loaded API model from file: " + yaml.safe_load(file))
|
|
243
243
|
api_model = APIModel(yaml.safe_load(file))
|
|
244
|
+
log.info(f"Loaded API model: {api_model}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|