Issue Details (XML | Word | Printable)

Key: CORE-2298
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Adriano dos Santos Fernandes
Reporter: Roman Rokytskyy
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Firebird Core

Add support for "some_col = ? or ? IS NULL" conditions

Created: 28/Jan/09 12:52 PM   Updated: 15/May/18 07:59 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5 Beta 1

Issue Links:

QA Status: Covered by another test(s)
Test Details:
See test for CORE-3076

 Description  « Hide
This construct is very often used to switch on/off some part of the search condition, especially in filtering on per-column basis:

In Delphi you would have something like this:

   WHERE col1 = :param1 OR :param1 IS NULL

IBO or other components pre-processes this query and replace the :param1 with ? marks and later simply set the correct values to different parameters.

The idea is to introduce new data type and change Firebird to return the columns data type for the first parameter and a newly created one (SQL_NULL) for the second parameter. Firebird would need to detect such constructs and act accordingly.

If the "param1" is not NULL, driver/application is required to set the correct data for the first parameter and set the XSQLVAR.sqlind to not null and leave XSQLVAR.sqldata empty/null.

If the "param2" is NULL, driver/application is required to set the XSQLVAR.sqlind of the first and second parameters to null and leave the XSQLVAR.sqldata empty/null.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.