Search Filter encapsulation.
More...
Public Object Methods |
scalar | sqlexpr (scalar expr) |
| Set or fetch the SQL expression that corresponds with this filter.
|
void | addorder (scalar field, scalar descending) |
| Add a field name to the list of fields the search result should be ordered by.
|
list | orderfields (list fields) |
| Get or set a list of fields the search results should be ordered by.
|
boolean | isdescending (scalar field, scalar descending) |
| Get or set if a field is to be sorted in descending order.
|
scalar | sqlorder () |
| Get the ordering settings as a string ready for inclusion in an SQL SELECT statement.
|
Detailed Description
Search Filter encapsulation.
Member Function Documentation
void DBCapsulator::SearchFilter::addorder |
( |
scalar |
field, |
|
|
scalar |
descending |
|
) |
| |
Add a field name to the list of fields the search result should be ordered by.
- Parameters
-
field | The name of the field that should be added. |
descending | (optional) must be "1" if order should be descending. |
boolean DBCapsulator::SearchFilter::isdescending |
( |
scalar |
field, |
|
|
scalar |
descending |
|
) |
| |
Get or set if a field is to be sorted in descending order.
- Parameters
-
field | The name of the field. |
descending | (optional) If set, the descending status is set to this value |
- Returns
- true if the field is to be ordered in descending order, false otherwise
list DBCapsulator::SearchFilter::orderfields |
( |
list |
fields | ) |
|
Get or set a list of fields the search results should be ordered by.
- Parameters
-
fields | (optional) If set, the list of order field names is set to this list. |
- Returns
- The list of field names.
scalar DBCapsulator::SearchFilter::sqlexpr |
( |
scalar |
expr | ) |
|
Set or fetch the SQL expression that corresponds with this filter.
This expression can be used as is in a SQL SELECT statement.
- Parameters
-
expr | String specifying the SQL expression. If this parameter is undefined the current expression is returned without any change. |
- Returns
- The current search filter expression.
scalar DBCapsulator::SearchFilter::sqlorder |
( |
| ) |
|
Get the ordering settings as a string ready for inclusion in an SQL SELECT statement.
- Returns
- String with an "ORDER BY" statement or an empty string if no order has been requested.
The documentation for this class was generated from the following file: