[DB] Added search filter helpers
This commit is contained in:
@@ -47,6 +47,7 @@ class SearchFilter
|
||||
|
||||
SearchFilter() {}
|
||||
|
||||
// Helpers
|
||||
static SearchFilter IdMatch( const IdMatchType& _idMatch )
|
||||
{
|
||||
return SearchFilter(_idMatch);
|
||||
@@ -57,6 +58,12 @@ class SearchFilter
|
||||
return SearchFilter(_nameLikeMatch);
|
||||
}
|
||||
|
||||
// Single ID match
|
||||
static SearchFilter ById(Field field, Wt::Dbo::dbo_default_traits::IdType id)
|
||||
{
|
||||
return SearchFilter({{field, {id} }});
|
||||
}
|
||||
|
||||
// The filter is a AND of the following conditions:
|
||||
|
||||
// ((Field1.name LIKE STR1-1 OR Field1.name LIKE STR1-2 ...) OR (Field2.name LIKE STR2-1 OR Field2.name LIKE STR2-2 ...) ...
|
||||
|
||||
Reference in New Issue
Block a user