FIX: validate numeric data for range (upper and lower bound) #77
+23
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
AB#37475
This pull request enhances the
BindParameters
function inmssql_python/pybind/ddbc_bindings.cpp
by introducing range validation for various parameter types to ensure data integrity and prevent out-of-range errors. Below are the key changes grouped by parameter type:Integer Parameter Validations
short
): Added range validation to ensure the value is within the limits of a signed 16-bit integer. Throws an exception if the value is out of range.unsigned short
): Added validation to check that the value does not exceed the maximum limit of an unsigned 16-bit integer.int64_t
): Introduced range validation to confirm the value is within the bounds of a signed 64-bit integer.uint64_t
): Added a check to ensure the value does not exceed the maximum limit for an unsigned 64-bit integer.Date Parameter Validation
year
attributes in date parameters to ensure they fall within the valid SQL Server date range (1753-9999).Checklist