-
Notifications
You must be signed in to change notification settings - Fork 27
modio::FilterCreator
The modio::FilterCreator is passed to Mods functions to filter the results.
Filtering API documentation: Filtering
void FilterCreator::setSort(const std::string& field, bool ascending);
API filtering parameter: _sort (Sort)
Sort by a column, on ascending or descending order.
Name | Type | Description |
---|---|---|
field | const std::string& |
Column where the sorting is applied. |
ascending | bool |
If set to true the result will be sorted on ascending order, otherwise on descending order. |
void FilterCreator::setLimit(u32 limit)
API filtering parameter: _limit (Limit)
Limit the number of results for a request.
Name | Type | Description |
---|---|---|
limit | u32 |
Number of results. |
void FilterCreator::setOffset(`u32` offset)
API filtering parameter: _offset
Excludes a given amount of registers ordered by id. Use this to paginate your results combined with setLimit.
Name | Type | Description |
---|---|---|
offset | u32 |
Amount to registers to be excluded from the result ordered by id. |
void FilterCreator::setFullTextSearch(`const std::string&` text)
API filtering parameter: _q (Full text search)
Full-text search is a lenient search filter that is only available if the object you are querying contains a name column.
Name | Type | Description |
---|---|---|
text | const std::string& |
Searched text. |
void FilterCreator::setCacheMaxAgeSeconds(u32 max_age_seconds)
API filtering parameter: N/A
Maximum time in seconds that a fetched response will be allowed to be reused from the local cache.
Name | Type | Description |
---|---|---|
max_age_seconds | u32 |
Maximum cache age allowed. |
void FilterCreator::addFieldValue(const std::string& field, const std::string& value)
Filters to the exact field's value match.
Name | Type | Description |
---|---|---|
field | const std::string& |
Filtered column. |
value | const std::string& |
String filter value. Supports the * wildcard. |
void FilterCreator::addLikeField(const std::string& field, const std::string& value)
API filtering parameter: _lk (Like)
Where the string supplied matches the preceding column value. This is the equivalent to SQL's LIKE. The * wildcard is supported e.g. addLikeField(filter, "name", "The world of *")
.
Name | Type | Description |
---|---|---|
field | const std::string& |
Filtered column. |
value | const std::string& |
String filter value. Supports the * wildcard. |
void FilterCreator::addNotLikeField(const std::string& field, const std::string& value)
API filtering parameter: -not-lk (Not like)
Where the string supplied does not match the preceding column value. This is the equivalent to SQL's NOT LIKE. The * wildcard is supported e.g. addNotLikeField(filter, "name", "The world of *")
.
Name | Type | Description |
---|---|---|
field | const std::string& |
Filtered column. |
value | const std::string& |
String filter value. Supports the * wildcard. |
void FilterCreator::addInField(`const std::string&` field, `const std::string&` value)
API filtering parameter: -in (In)
Where the supplied list of values appears in the preceding column value. This is the equivalent to SQL's IN.
Name | Type | Description |
---|---|---|
field | const std::string& |
Filtered column. |
value | const std::string& |
Filter value. |
void FilterCreator::addNotInField(const std::string& field, const std::string& value)
API filtering parameter: -not-in (Not In)
Where the supplied list of values does not in the preceding column value. This is the equivalent to SQL's NOT IN
Name | Type | Description |
---|---|---|
field | const std::string& |
Filtered column. |
value | const std::string& |
Filter value. |
void FilterCreator::addMinField(const std::string& field, double value)
API filtering parameter: -min (Min)
Where the preceding column value is greater than or equal to the value specified.
Name | Type | Description |
---|---|---|
field | const std::string& |
Filtered column. |
value | double |
Filter value. |
void FilterCreator::addMaxField(const std::string& field, double value)
API filtering parameter: -max (Max)
Where the preceding column value is smaller than or equal to the value specified.
Name | Type | Description |
---|---|---|
field | const std::string& |
Filtered column. |
value | double |
Filter value. |
void FilterCreator::addSmallerThanField(const std::string& field, double value)
API filtering parameter: -st (Smaller Than)
Where the preceding column value is smaller than the value specified.
Name | Type | Description |
---|---|---|
field | const std::string& |
Filtered column. |
value | double |
Filter value. |
void FilterCreator::addGreaterThanField(const std::string& field, double value)
API filtering parameter: -gt (Greater Than)
Where the preceding column value is greater than the value specified.
Name | Type | Description |
---|---|---|
field | const std::string& |
Filtered column. |
value | double |
Filter value. |
void FilterCreator::addNotEqualField(const std::string& field, const std::string& value)
API filtering parameter: -not (Not Equal To)
Where the preceding column value does not equal the value specified.
Name | Type | Description |
---|---|---|
field | const std::string& |
Filtered column. |
value | const std::string& |
Filter value. |
- Home
- Table of Contents
- Getting Started
- SDK Methods
- Creators
- Editors
- Schemas
- modio::Avatar
- modio::Comment
- modio::Dependency
- modio::Download
- modio::Error
- modio::Filehash
- modio::Game
- modio::GameTagOption
- modio::Header
- modio::Icon
- modio::Image
- modio::InstalledMod
- modio::Logo
- modio::Media
- modio::MetadataKVP
- modio::Mod
- modio::ModEvent
- modio::Modfile
- modio::QueuedModDownload
- modio::QueuedModfileUpload
- modio::Rating
- modio::Response
- modio::Stats
- modio::Tag
- modio::User
- Debugging
- Constants
-
C Compatibility
- Methods
- Initialization, Process and Shutdown (C compatible)
- User Authentication (C compatible)
- Mods (C compatible)
- Modfiles (C compatible)
- Media (C compatible)
- Subscriptions (C compatible)
- Events (C compatible)
- Stats (C compatible)
- Tags (C compatible)
- Ratings (C compatible)
- Metadata KVP (C compatible)
- Dependencies (C compatible)
- Comments (C compatible)
- Reports (C compatible)
- Me (C compatible)
- Downloads (C compatible)
- Uploads (C compatible)
- Logs (C compatible)
- External Auth (C compatible)
- Configuration (C compatible)
- Creators
- Editors
- Schemas
- ModioAvatar
- ModioComment
- ModioDependency
- ModioDownload
- ModioError
- ModioFilehash
- ModioGame
- ModioGameTagOption
- ModioHeader
- ModioIcon
- ModioImage
- ModioInstalledMod
- ModioListNode
- ModioLogo
- ModioMedia
- ModioMetadataKVP
- ModioMod
- ModioModEvent
- ModioModfile
- ModioQueuedModDownload
- ModioQueuedModfileUpload
- ModioRating
- ModioResponse
- ModioStats
- ModioTag
- ModioUser
- Methods
- Building