api-foundry-query-engine 0.8.86__tar.gz → 0.8.88__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.86 → api_foundry_query_engine-0.8.88}/PKG-INFO +1 -1
- api_foundry_query_engine-0.8.88/api_foundry_query_engine/__init__.py +1 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/dao/sql_select_query_handler.py +6 -2
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/utils/api_model.py +9 -5
- api_foundry_query_engine-0.8.86/api_foundry_query_engine/__init__.py +0 -1
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/.gitignore +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/LICENSE +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/.pre-commit-config.yaml +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/adapters/adapter.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/adapters/gateway_adapter.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/connectors/connection.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/connectors/connection_factory.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/connectors/data_api_connection.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/connectors/postgres_connection.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/dao/batch_operation_handler.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/dao/dao.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/dao/operation_dao.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/dao/sql_custom_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/dao/sql_delete_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/dao/sql_insert_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/dao/sql_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/dao/sql_restore_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/dao/sql_subselect_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/dao/sql_update_query_handler.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/lambda_handler.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/operation.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/services/service.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/services/transactional_service.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/utils/app_exception.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/utils/claims_check.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/utils/dependency_resolver.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/utils/logger.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/utils/reference_resolver.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/api_foundry_query_engine/utils/token_decoder.py +0 -0
- {api_foundry_query_engine-0.8.86 → api_foundry_query_engine-0.8.88}/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.88
|
|
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.88"
|
|
@@ -417,16 +417,20 @@ class SQLSelectSchemaQueryHandler(SQLSchemaQueryHandler):
|
|
|
417
417
|
|
|
418
418
|
@property
|
|
419
419
|
def limit_expression(self) -> str:
|
|
420
|
+
"""__limit, capped at the schema object's row limit, which also
|
|
421
|
+
applies when __limit is left out."""
|
|
422
|
+
cap = getattr(self.schema_object, "limit", None)
|
|
420
423
|
limit_str = self.operation.metadata_params.get("limit", None)
|
|
421
424
|
if not limit_str:
|
|
422
|
-
return ""
|
|
425
|
+
return f" LIMIT {int(cap)}" if cap else ""
|
|
423
426
|
|
|
424
427
|
if isinstance(limit_str, str) and not limit_str.isdigit():
|
|
425
428
|
raise ApplicationException(
|
|
426
429
|
400, f"Limit is not an valid integer {limit_str}"
|
|
427
430
|
)
|
|
428
431
|
|
|
429
|
-
|
|
432
|
+
limit = int(limit_str)
|
|
433
|
+
return f" LIMIT {min(limit, int(cap)) if cap else limit}"
|
|
430
434
|
|
|
431
435
|
@property
|
|
432
436
|
def offset_expression(self) -> str:
|
|
@@ -186,17 +186,18 @@ class SchemaObjectProperty:
|
|
|
186
186
|
elif api_type in ["number", "float"]:
|
|
187
187
|
return float(value) if value is not None else None
|
|
188
188
|
|
|
189
|
-
# Handle boolean type
|
|
189
|
+
# Handle boolean type: a JSON true or false. Never a string --
|
|
190
|
+
# "False" is truthy to every JSON client.
|
|
190
191
|
elif api_type == "boolean":
|
|
191
192
|
if isinstance(value, bool):
|
|
192
|
-
return
|
|
193
|
+
return value
|
|
193
194
|
elif isinstance(value, int):
|
|
194
195
|
# Handle boolean stored as integer (0/1)
|
|
195
|
-
return
|
|
196
|
+
return value != 0
|
|
196
197
|
elif isinstance(value, str):
|
|
197
|
-
return value.lower() in ["true", "1", "yes", "on"]
|
|
198
|
+
return value.lower() in ["true", "t", "1", "yes", "on"]
|
|
198
199
|
else:
|
|
199
|
-
return
|
|
200
|
+
return bool(value)
|
|
200
201
|
|
|
201
202
|
# Handle date type
|
|
202
203
|
elif api_type == "date":
|
|
@@ -311,6 +312,9 @@ class SchemaObject:
|
|
|
311
312
|
)
|
|
312
313
|
self._primary_key: str = str(data.get("primary_key"))
|
|
313
314
|
self.permissions = data.get("permissions")
|
|
315
|
+
# Most rows one read returns (api_foundry's x-af-limit). None in a
|
|
316
|
+
# config from an api_foundry before 0.8.13: no cap.
|
|
317
|
+
self.limit: Optional[int] = data.get("limit")
|
|
314
318
|
|
|
315
319
|
def __repr__(self):
|
|
316
320
|
return f"SchemaObject(table_name={self.table_name}, primary_key={self.primary_key})"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.8.86"
|
|
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
|