api-foundry-query-engine 0.8.66__tar.gz → 0.8.68__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.
Files changed (37) hide show
  1. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/PKG-INFO +1 -1
  2. api_foundry_query_engine-0.8.68/api_foundry_query_engine/__init__.py +1 -0
  3. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/dao/sql_delete_query_handler.py +3 -4
  4. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/dao/sql_restore_query_handler.py +3 -4
  5. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/dao/sql_select_query_handler.py +1 -2
  6. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/dao/sql_update_query_handler.py +1 -2
  7. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/utils/api_model.py +5 -0
  8. api_foundry_query_engine-0.8.66/api_foundry_query_engine/__init__.py +0 -1
  9. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/.gitignore +0 -0
  10. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/LICENSE +0 -0
  11. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/.pre-commit-config.yaml +0 -0
  12. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/adapters/adapter.py +0 -0
  13. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/adapters/case_change_adapter.py +0 -0
  14. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/adapters/gateway_adapter.py +0 -0
  15. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/adapters/security_adapter.py +0 -0
  16. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/connectors/connection.py +0 -0
  17. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/connectors/connection_factory.py +0 -0
  18. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/connectors/oracle_connector.py +0 -0
  19. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/connectors/postgres_connection.py +0 -0
  20. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/dao/batch_operation_handler.py +0 -0
  21. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/dao/dao.py +0 -0
  22. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/dao/operation_dao.py +0 -0
  23. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/dao/sql_custom_query_handler.py +0 -0
  24. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/dao/sql_insert_query_handler.py +0 -0
  25. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/dao/sql_query_handler.py +0 -0
  26. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/dao/sql_subselect_query_handler.py +0 -0
  27. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/lambda_handler.py +0 -0
  28. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/operation.py +0 -0
  29. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/services/service.py +0 -0
  30. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/services/transactional_service.py +0 -0
  31. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/utils/app_exception.py +0 -0
  32. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/utils/claims_check.py +0 -0
  33. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/utils/dependency_resolver.py +0 -0
  34. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/utils/logger.py +0 -0
  35. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/utils/reference_resolver.py +0 -0
  36. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/api_foundry_query_engine/utils/token_decoder.py +0 -0
  37. {api_foundry_query_engine-0.8.66 → api_foundry_query_engine-0.8.68}/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.66
3
+ Version: 0.8.68
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.68"
@@ -93,16 +93,15 @@ class SQLDeleteSchemaQueryHandler(SQLSchemaQueryHandler):
93
93
 
94
94
  # Process audit fields
95
95
  audit_props = self.schema_object.get_soft_delete_audit_properties()
96
- claims = self.operation.claims or {}
97
-
98
96
  for _, prop in audit_props.items():
99
97
  config = prop.get_soft_delete_config()
100
98
  action = config.get("action", "")
101
99
 
102
- if action == "delete" and "sub" in claims:
100
+ claim_sub = self.extract_injected_value("claim:sub")
101
+ if action == "delete" and claim_sub is not None:
103
102
  placeholder_key = f"audit_{prop.api_name}"
104
103
  columns.append(f"{prop.column_name} = %({placeholder_key})s")
105
- self.store_placeholders[placeholder_key] = claims["sub"]
104
+ self.store_placeholders[placeholder_key] = claim_sub
106
105
 
107
106
  return " SET " + ", ".join(columns) if columns else ""
108
107
 
@@ -89,16 +89,15 @@ class SQLRestoreSchemaQueryHandler(SQLSchemaQueryHandler):
89
89
 
90
90
  # Process audit fields for restore action
91
91
  audit_props = self.schema_object.get_soft_delete_audit_properties()
92
- claims = self.operation.claims or {}
93
-
94
92
  for _, prop in audit_props.items():
95
93
  config = prop.get_soft_delete_config()
96
94
  action = config.get("action", "")
97
95
 
98
- if action == "restore" and "sub" in claims:
96
+ claim_sub = self.extract_injected_value("claim:sub")
97
+ if action == "restore" and claim_sub is not None:
99
98
  placeholder_key = f"audit_{prop.api_name}"
100
99
  columns.append(f"{prop.column_name} = %({placeholder_key})s")
101
- self.store_placeholders[placeholder_key] = claims["sub"]
100
+ self.store_placeholders[placeholder_key] = claim_sub
102
101
  elif action == "restore_timestamp":
103
102
  columns.append(f"{prop.column_name} = CURRENT_TIMESTAMP")
104
103
 
@@ -69,8 +69,7 @@ class SQLSelectSchemaQueryHandler(SQLSchemaQueryHandler):
69
69
 
70
70
  def _replace(m: Match[str]) -> str:
71
71
  key = m.group(1)
72
- claims = self.operation.claims or {}
73
- return _quote(claims.get(key))
72
+ return _quote(self.extract_injected_value(f"claim:{key}"))
74
73
 
75
74
  return re.sub(r"\$\{claims\.([A-Za-z0-9_]+)\}", _replace, expr)
76
75
 
@@ -26,8 +26,7 @@ class SQLUpdateSchemaQueryHandler(SQLSchemaQueryHandler):
26
26
 
27
27
  def _replace(m: Match[str]) -> str:
28
28
  key = m.group(1)
29
- claims = self.operation.claims or {}
30
- return _quote(claims.get(key))
29
+ return _quote(self.extract_injected_value(f"claim:{key}"))
31
30
 
32
31
  return re.sub(r"\$\{claims\.([A-Za-z0-9_]+)\}", _replace, expr)
33
32
 
@@ -125,6 +125,11 @@ class SchemaObjectProperty:
125
125
 
126
126
  api_type = self.api_type if self.api_type is not None else "string"
127
127
 
128
+ # Preserve structured values so JSON aggregates are serialized as native
129
+ # arrays/objects instead of stringified Python representations.
130
+ if api_type in ["array", "object"]:
131
+ return value
132
+
128
133
  # Handle string types (including UUID which is represented as string in API)
129
134
  if api_type in ["string", "uuid"]:
130
135
  return str(value) if value is not None else None
@@ -1 +0,0 @@
1
- __version__ = "0.8.66"