These are utility functions which help to build condition object to be used with queries and query builders representing LIKE condition.
The result condition type for each function is specified as a comment below. Due to possible ambiguities (for example, db::Like(L"name", L"Ja%")
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 LIKE pattern) you have to exactly specify the type of argument. As an alternative you can use db::lk*()
functions instead.
DbCondition Like(const String &column, const String &pattern); // column LIKE pattern
DbCondition Like(const DbValue &value, const String &pattern); // value LIKE pattern
DbCondition Like(DbCondition expression, const String &pattern); // expression LIKE pattern
Namespace: | nitisa::db |
Include: | Nitisa/Db/DbCondition.h |