Appwrite C++ SDK
Auto-generated API documentation for the Appwrite C++ SDK
|
Utility class to construct and manage Appwrite-style database query filters. More...
#include <Query.hpp>
Public Member Functions | |
void | addComplexQuery (const std::string jsonQuery) |
Add a raw JSON complex query. | |
template<typename T > | |
void | notEqual (const std::string attributeId, std::list< T > &values) |
Filter documents where attribute does not equal any value in list. | |
Queries () | |
Constructor. | |
template<typename T > | |
void | queryBetween (const std::string attributeId, const T &value1, const T &value2) |
Filter documents where attribute is between two values. | |
void | queryContains (const std::string attributeId, const std::string &value) |
Filter documents where attribute contains the value. | |
template<typename T > | |
void | queryContains (const std::string attributeId, std::list< T > &value) |
Filter documents where attribute contains any value from list. | |
void | queryCursorAfter (const std::string documentId) |
Add a cursor query to paginate after the given document ID. | |
void | queryEndsWith (const std::string attributeId, const std::string &value) |
Filter documents where attribute ends with given value. | |
template<typename T > | |
void | queryEqual (const std::string attributeId, std::list< T > &values) |
Filter documents where attribute equals any value in list. | |
template<typename T > | |
void | queryGreaterThan (const std::string attributeId, const T &value) |
Filter documents where attribute is greater than value. | |
template<typename T > | |
void | queryGreaterThanEqual (const std::string attributeId, const T &value) |
Filter documents where attribute is greater than or equal to value. | |
void | queryIsNotNull (const std::string attributeId) |
Filter documents where an attribute is not null. | |
void | queryIsNull (const std::string attributeId) |
Filter documents where an attribute is null. | |
template<typename T > | |
void | queryLessThan (const std::string attributeId, const T &value) |
Filter documents where attribute is less than value. | |
template<typename T > | |
void | queryLessThanEqual (const std::string attributeId, const T &value) |
Filter documents where attribute is less than or equal to value. | |
void | queryLimit (int limit) |
Limit the number of documents returned. | |
void | querySelect (std::list< std::string > &values) |
Select only certain fields from the result. | |
void | queryStartsWith (const std::string attributeId, const std::string &value) |
Filter documents where attribute starts with given value. | |
bool | removeJsonQuery (int index) |
Remove a JSON query by index. | |
void | reset () |
Resets the internal query list. | |
std::string | to_string () |
Serialize all added queries into a JSON string. | |
Utility class to construct and manage Appwrite-style database query filters.
Provides methods to build query filters like equal, contains, range-based, null checks, and complex queries for Appwrite API requests.
Queries::Queries | ( | ) |
Constructor.
void Queries::addComplexQuery | ( | const std::string | jsonQuery | ) |
Add a raw JSON complex query.
jsonQuery | A valid Appwrite-style JSON query string. |
|
inline |
Filter documents where attribute does not equal any value in list.
T | Value type. |
attributeId | The attribute key. |
values | List of disallowed values. |
Definition at line 244 of file Query.hpp.
|
inline |
Filter documents where attribute is between two values.
T | Comparable value type. |
attributeId | The attribute key. |
value1 | Lower bound. |
value2 | Upper bound. |
Definition at line 118 of file Query.hpp.
void Queries::queryContains | ( | const std::string | attributeId, |
const std::string & | value | ||
) |
Filter documents where attribute contains the value.
attributeId | The attribute key. |
value | The substring to match. |
|
inline |
Filter documents where attribute contains any value from list.
T | Type of values in the list. |
attributeId | The attribute key. |
value | List of values to check containment. |
Definition at line 98 of file Query.hpp.
void Queries::queryCursorAfter | ( | const std::string | documentId | ) |
Add a cursor query to paginate after the given document ID.
documentId | The document ID to start after. |
void Queries::queryEndsWith | ( | const std::string | attributeId, |
const std::string & | value | ||
) |
Filter documents where attribute ends with given value.
attributeId | The attribute key. |
value | The ending value to match. |
|
inline |
Filter documents where attribute equals any value in list.
T | Value type. |
attributeId | The attribute key. |
values | List of accepted values. |
Definition at line 225 of file Query.hpp.
|
inline |
Filter documents where attribute is greater than value.
T | Value type. |
attributeId | The attribute key. |
value | The threshold. |
Definition at line 165 of file Query.hpp.
|
inline |
Filter documents where attribute is greater than or equal to value.
T | Value type. |
attributeId | The attribute key. |
value | The lower bound. |
Definition at line 144 of file Query.hpp.
void Queries::queryIsNotNull | ( | const std::string | attributeId | ) |
Filter documents where an attribute is not null.
attributeId | The attribute key to filter. |
void Queries::queryIsNull | ( | const std::string | attributeId | ) |
Filter documents where an attribute is null.
attributeId | The attribute key to filter. |
|
inline |
Filter documents where attribute is less than value.
T | Value type. |
attributeId | The attribute key. |
value | The threshold. |
Definition at line 205 of file Query.hpp.
|
inline |
Filter documents where attribute is less than or equal to value.
T | Value type. |
attributeId | The attribute key. |
value | The upper bound. |
Definition at line 185 of file Query.hpp.
void Queries::queryLimit | ( | int | limit | ) |
Limit the number of documents returned.
limit | The maximum number of documents. |
void Queries::querySelect | ( | std::list< std::string > & | values | ) |
Select only certain fields from the result.
values | List of field names to return. |
void Queries::queryStartsWith | ( | const std::string | attributeId, |
const std::string & | value | ||
) |
Filter documents where attribute starts with given value.
attributeId | The attribute key. |
value | The starting value to match. |
bool Queries::removeJsonQuery | ( | int | index | ) |
Remove a JSON query by index.
index | The index of the query to remove. |
void Queries::reset | ( | ) |
Resets the internal query list.
std::string Queries::to_string | ( | ) |
Serialize all added queries into a JSON string.