Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for "some_col = ? or ? IS NULL" conditions [CORE2298] #2722

Closed
firebird-automations opened this issue Jan 28, 2009 · 5 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Roman Rokytskyy (rrokytskyy)

Is related to QA319

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.

Commits: 8918458 ced3b00 3592de2 9784181

====== Test Details ======

See test for CORE3076

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

security: Developers [ 10012 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 Beta 1 [ 10251 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA319 [ QA319 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Covered by another test(s)

Test Details: See test for CORE3076

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants