Content


NTL
Core
db::Between

db::Between


These are utility functions which help to build condition object to be used with queries and query builders representing BETWEEN condition.

The result condition type for each function is specified as a comment below. Due to possible ambiguities (for example, db::Between(L"name", L"Jack", L"John") seems fine but both String and DbValue have constructors accepting const wchar_t* argument and for compiler it is not obvious that the first argument should be interpreted as string and the second and third ones as values so that final condition would be column BETWEEN value1 AND value2) you have to exactly specify the type of argument. As an alternative you can use db::bt*() functions instead.

DbCondition Between(const String &operand1, const String &operand2, const String &operand3); // column1 BETWEEN column2 AND column3
DbCondition Between(const String &operand1, const String &operand2, const DbValue &operand3); // column1 BETWEEN column2 AND value3
DbCondition Between(const String &operand1, const String &operand2, DbCondition operand3); // column1 BETWEEN column2 AND expression3
DbCondition Between(const String &operand1, const DbValue &operand2, const String &operand3); // column1 BETWEEN value2 AND column3
DbCondition Between(const String &operand1, const DbValue &operand2, const DbValue &operand3); // column1 BETWEEN value2 AND value3
DbCondition Between(const String &operand1, const DbValue &operand2, DbCondition operand3); // column1 BETWEEN value2 AND expression3
DbCondition Between(const String &operand1, DbCondition operand2, const String &operand3); // column1 BETWEEN expression2 AND column3
DbCondition Between(const String &operand1, DbCondition operand2, const DbValue &operand3); // column1 BETWEEN expression2 AND value3
DbCondition Between(const String &operand1, DbCondition operand2, DbCondition operand3); // column1 BETWEEN expression2 AND expression3
DbCondition Between(const DbValue &operand1, const String &operand2, const String &operand3); // value1 BETWEEN column2 AND column3
DbCondition Between(const DbValue &operand1, const String &operand2, const DbValue &operand3); // value1 BETWEEN column2 AND value3
DbCondition Between(const DbValue &operand1, const String &operand2, DbCondition operand3); // value1 BETWEEN column2 AND expression3
DbCondition Between(const DbValue &operand1, const DbValue &operand2, const String &operand3); // value1 BETWEEN value2 AND column3
DbCondition Between(const DbValue &operand1, const DbValue &operand2, const DbValue &operand3); // value1 BETWEEN value2 AND value3
DbCondition Between(const DbValue &operand1, const DbValue &operand2, DbCondition operand3); // value1 BETWEEN value2 AND expression3
DbCondition Between(const DbValue &operand1, DbCondition operand2, const String &operand3); // value1 BETWEEN expression2 AND column3
DbCondition Between(const DbValue &operand1, DbCondition operand2, const DbValue &operand3); // value1 BETWEEN expression2 AND value3
DbCondition Between(const DbValue &operand1, DbCondition operand2, DbCondition operand3); // value1 BETWEEN expression2 AND expression3
DbCondition Between(DbCondition operand1, const String &operand2, const String &operand3); // expression1 BETWEEN column2 AND column3
DbCondition Between(DbCondition operand1, const String &operand2, const DbValue &operand3); // expression1 BETWEEN column2 AND value3
DbCondition Between(DbCondition operand1, const String &operand2, DbCondition operand3); // expression1 BETWEEN column2 AND expression3
DbCondition Between(DbCondition operand1, const DbValue &operand2, const String &operand3); // expression1 BETWEEN value2 AND column3
DbCondition Between(DbCondition operand1, const DbValue &operand2, const DbValue &operand3); // expression1 BETWEEN value2 AND value3
DbCondition Between(DbCondition operand1, const DbValue &operand2, DbCondition operand3); // expression1 BETWEEN value2 AND expression3
DbCondition Between(DbCondition operand1, DbCondition operand2, const String &operand3); // expression1 BETWEEN expression2 AND column3
DbCondition Between(DbCondition operand1, DbCondition operand2, const DbValue &operand3); // expression1 BETWEEN expression2 AND value3
DbCondition Between(DbCondition operand1, DbCondition operand2, DbCondition operand3); // expression1 BETWEEN expression2 AND expression3
Namespace: nitisa::db
Include: Nitisa/Db/DbCondition.h