Content


NTL
Core
db::NotIn

db::NotIn


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

The result condition type for each function is specified as a comment below. Due to possible ambiguities (for example, db::NotIn(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 one as value so that final condition would be column NOT IN (value1, value2)) you have to exactly specify the type of argument. As an alternative you can use db::ni*() functions instead.

DbCondition NotIn(const String &column, const std::vector<DbValue> &values); // column NOT IN (...)
DbCondition NotIn(const DbValue &value, const std::vector<DbValue> &values); // value NOTIN (...)
DbCondition NotIn(DbCondition expression, const std::vector<DbValue> &values); // expression NOT IN (...)
Namespace: nitisa::db
Include: Nitisa/Db/DbCondition.h