Class SS_Report_FakeQuery
This is an object that can be used to dress up a more complex querying mechanism in the clothing of a SQLQuery object. This means that you can inject it into a TableListField.
Use it like this:
function sourceQuery($params) { return new SS_Report_FakeQuery($this,
'sourceRecords', $params) } function sourceRecords($params, $sort, $limit) { //
Do some stuff // Return a DataObjectSet of actual objects. }
This object is used by the default implementation of sourceQuery() on SS_Report, to make use of a sourceReords() method if one exists.
- SQLQuery
-
SS_Report_FakeQuery
Methods summary
public
|
|
public
|
#
setSortColumnMethod( mixed $sortColMethod )
Provide a method that will return a list of columns that can be used to sort. |
public
|
|
public
integer
|
#
unlimitedRowCount( )
Return the number of rows in this query if the limit were removed. Useful in paged data sets. |
public
|
|
public
|
Methods inherited from SQLQuery
__toString(),
filtersOnFK(),
filtersOnID(),
from(),
getFilter(),
groupby(),
having(),
innerJoin(),
isJoinedTo(),
leftJoin(),
orderby(),
renameTable(),
replaceText(),
select(),
sql(),
useConjunction(),
useDisjunction(),
where()
Magic methods summary
Properties summary
public
string
|
$orderby |
#
An ORDER BY clause. |
public
string
|
$limit |
#
A limit clause. |
protected
mixed
|
$obj | |
protected
mixed
|
$method | |
protected
mixed
|
$params |
Properties inherited from SQLQuery
$connective,
$delete,
$distinct,
$from,
$groupby,
$having,
$select,
$where