api-foundry-query-engine 0.8.43__tar.gz → 0.8.45__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.43 → api_foundry_query_engine-0.8.45}/PKG-INFO +1 -1
- api_foundry_query_engine-0.8.45/api_foundry_query_engine/__init__.py +1 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/dao/sql_insert_query_handler.py +17 -14
- api_foundry_query_engine-0.8.43/api_foundry_query_engine/__init__.py +0 -1
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/.gitignore +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/LICENSE +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/.pre-commit-config.yaml +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/adapters/adapter.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/adapters/case_change_adapter.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/adapters/gateway_adapter.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/adapters/security_adapter.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/connectors/connection.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/connectors/connection_factory.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/connectors/oracle_connector.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/connectors/postgres_connection.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/dao/batch_operation_handler.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/dao/dao.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/dao/operation_dao.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/dao/sql_custom_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/dao/sql_delete_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/dao/sql_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/dao/sql_restore_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/dao/sql_select_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/dao/sql_subselect_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/dao/sql_update_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/lambda_handler.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/operation.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/services/service.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/services/transactional_service.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/utils/api_model.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/utils/app_exception.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/utils/claims_check.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/utils/dependency_resolver.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/utils/gateway_operation.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/utils/logger.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/utils/reference_resolver.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/api_foundry_query_engine/utils/token_decoder.py +0 -0
- {api_foundry_query_engine-0.8.43 → api_foundry_query_engine-0.8.45}/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.45
|
|
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.45"
|
|
@@ -45,16 +45,23 @@ class SQLInsertSchemaQueryHandler(SQLSchemaQueryHandler):
|
|
|
45
45
|
@property
|
|
46
46
|
def selection_results(self) -> Dict:
|
|
47
47
|
"""
|
|
48
|
-
Override parent to
|
|
49
|
-
Returns columns
|
|
48
|
+
Override parent to combine read+write permissions for INSERT RETURNING.
|
|
49
|
+
Returns all columns the user can read OR write.
|
|
50
50
|
"""
|
|
51
51
|
if not hasattr(self, "_insert_selection_results"):
|
|
52
|
-
#
|
|
53
|
-
|
|
52
|
+
# Get both read and write permissions
|
|
53
|
+
write_props = self.check_permissions(
|
|
54
54
|
"write",
|
|
55
55
|
self.schema_object.permissions,
|
|
56
56
|
self.schema_object.properties,
|
|
57
57
|
)
|
|
58
|
+
read_props = self.check_permissions(
|
|
59
|
+
"read",
|
|
60
|
+
self.schema_object.permissions,
|
|
61
|
+
self.schema_object.properties,
|
|
62
|
+
)
|
|
63
|
+
# Combine both (union of read and write)
|
|
64
|
+
self._insert_selection_results = {**read_props, **write_props}
|
|
58
65
|
return self._insert_selection_results
|
|
59
66
|
|
|
60
67
|
@property
|
|
@@ -85,24 +92,20 @@ class SQLInsertSchemaQueryHandler(SQLSchemaQueryHandler):
|
|
|
85
92
|
|
|
86
93
|
def _get_returning_clause(self) -> str:
|
|
87
94
|
"""
|
|
88
|
-
Get RETURNING clause
|
|
89
|
-
Returns all fields the user
|
|
95
|
+
Get RETURNING clause with combined read+write permissions.
|
|
96
|
+
Returns all fields the user can read OR write.
|
|
90
97
|
"""
|
|
91
|
-
#
|
|
92
|
-
allowed_properties = self.
|
|
93
|
-
"write",
|
|
94
|
-
self.schema_object.permissions,
|
|
95
|
-
self.schema_object.properties,
|
|
96
|
-
)
|
|
98
|
+
# Use the combined selection_results (read + write)
|
|
99
|
+
allowed_properties = self.selection_results
|
|
97
100
|
|
|
98
101
|
if allowed_properties:
|
|
99
|
-
# Return all
|
|
102
|
+
# Return all accessible columns
|
|
100
103
|
columns = [
|
|
101
104
|
prop.column_name for prop in allowed_properties.values()
|
|
102
105
|
]
|
|
103
106
|
return f"RETURNING {', '.join(columns)}"
|
|
104
107
|
|
|
105
|
-
# Fallback to primary key if no
|
|
108
|
+
# Fallback to primary key if no permissions
|
|
106
109
|
# (shouldn't happen if user can INSERT)
|
|
107
110
|
pk_property = self.schema_object.primary_key
|
|
108
111
|
if pk_property:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.8.43"
|
|
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
|