Trying to create the following query in Connector/C++ 8 (xDevAPI):
SELECT * FROM table
WHERE column1 IS NULL OR (column2 is NULL AND DATE_SUB(NOW(), INTERVAL 10 SECOND) > column1);
Not sure how to go about this WHERE part in code. Wrapping everything in expr() throws an error: CDK Error: After seeing '...IS NULL OR (column2 is NULL AND DATE_SUB(NOW(), INTERVAL ', looking at '10 SEC...': Expected ')' to close function argument list (cdk:8)
What is a proper way? Also will it work if I parametrize 10 with :timeout and then bind("timeout", 10)?
SELECT * FROM table
WHERE column1 IS NULL OR (column2 is NULL AND DATE_SUB(NOW(), INTERVAL 10 SECOND) > column1);
Not sure how to go about this WHERE part in code. Wrapping everything in expr() throws an error: CDK Error: After seeing '...IS NULL OR (column2 is NULL AND DATE_SUB(NOW(), INTERVAL ', looking at '10 SEC...': Expected ')' to close function argument list (cdk:8)
What is a proper way? Also will it work if I parametrize 10 with :timeout and then bind("timeout", 10)?