-
Notifications
You must be signed in to change notification settings - Fork 27
ModioFilterCreator
The ModioFilterCreator is passed to Mods (C compatible) functions to filter the results. Instead of editing the struct directly, we recommend you to customize it using the ModioFilterCreator functions.
Filtering API documentation: Filtering
void modioSetFilterSort(ModioFilterCreator* filter, char* field, bool ascending);
API filtering parameter: _sort (Sort)
Sort by a column, on ascending or descending order.
Name | Type | Description |
---|---|---|
filter | ModioFilterCreator* | ModioFilterCreator object to be customized |
field | char* | 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 modioSetFilterLimit(ModioFilterCreator* filter, u32 limit)
API filtering parameter: _limit (Limit)
Limit the number of results for a request.
Name | Type | Description |
---|---|---|
filter | ModioFilterCreator* | ModioFilterCreator object to be customized |
limit | u32 | Number of results |
void modioSetFilterOffset(ModioFilterCreator* filter, u32 offset)
API filtering parameter: _offset
Excludes a given amount of registers ordered by id. Use this to paginate your results combined with modioSetFilterLimit.
Name | Type | Description |
---|---|---|
filter | ModioFilterCreator* | ModioFilterCreator object to be customized |
offset | u32 | Amount to registers to be excluded from the result ordered by id |
void modioSetFilterFullTextSearch(ModioFilterCreator* filter, char* 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 |
---|---|---|
filter | ModioFilterCreator* | ModioFilterCreator object to be customized |
text | char* | Searched text |
void modioSetFilterCacheMaxAgeSeconds(ModioFilterCreator* filter, 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 |
---|---|---|
filter | ModioFilterCreator* | ModioFilterCreator object to be customized |
max_age_seconds | u32 | Maximum cache age allowed. |
void modioAddFilterLikeField(ModioFilterCreator* filter, char* field, char* 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. addFilterLikeField(filter, "name", "The world of *")
.
Name | Type | Description |
---|---|---|
filter | ModioFilterCreator* | ModioFilterCreator object to be customized |
field | char* | Filtered column |
value | char* | String filter value. Supports the * wildcard. |
void modioAddFilterNotLikeField(ModioFilterCreator* filter, char* field, char* 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. addFilterNotLikeField(filter, "name", "The world of *")
.
Name | Type | Description |
---|---|---|
filter | ModioFilterCreator* | ModioFilterCreator object to be customized |
field | char* | Filtered column |
value | char* | String filter value. Supports the * wildcard. |
void modioAddFilterInField(ModioFilterCreator* filter, char* field, char* 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 |
---|---|---|
filter | ModioFilterCreator* | ModioFilterCreator object to be customized |
field | char* | Filtered column |
value | char* | Filter value |
void modioAddFilterNotInField(ModioFilterCreator* filter, char* field, char* 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 |
---|---|---|
filter | ModioFilterCreator* | ModioFilterCreator object to be customized |
field | char* | Filtered column |
value | char* | Filter value |
void modioAddFilterMinField(ModioFilterCreator* filter, char* 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 |
---|---|---|
filter | ModioFilterCreator* | ModioFilterCreator object to be customized |
field | char* | Filtered column |
value | double | Filter value |
void modioAddFilterMaxField(ModioFilterCreator* filter, char* 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 |
---|---|---|
filter | ModioFilterCreator* | ModioFilterCreator object to be customized |
field | char* | Filtered column |
value | double | Filter value |
void modioAddFilterSmallerThanField(ModioFilterCreator* filter, char* field, double value)
API filtering parameter: -st (Smaller Than)
Where the preceding column value is smaller than the value specified.
Name | Type | Description |
---|---|---|
filter | ModioFilterCreator* | ModioFilterCreator object to be customized |
field | char* | Filtered column |
value | double | Filter value |
void modioAddFilterGreaterThanField(ModioFilterCreator* filter, char* field, double value)
API filtering parameter: -gt (Greater Than)
Where the preceding column value is greater than the value specified.
Name | Type | Description |
---|---|---|
filter | ModioFilterCreator* | ModioFilterCreator object to be customized |
field | char* | Filtered column |
value | double | Filter value |
void modioAddFilterNotEqualField(ModioFilterCreator* filter, char* field, char* value)
API filtering parameter: -not (Not Equal To)
Where the preceding column value does not equal the value specified.
Name | Type | Description |
---|---|---|
filter | ModioFilterCreator* | ModioFilterCreator object to be customized |
field | char* | Filtered column |
value | char* | 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