ZenMagick 0.9.10


org.zenmagick.core.services.database\ZMQueryDetails
core\services\database\ZMQueryDetails.php at line 30

Class ZMQueryDetails

ZMObject
└─ZMQueryDetails

public class ZMQueryDetails
extends ZMObject

Query details as returned by the ZMSQLAware interface method.

Author:
DerManoMann

Fields inherited from org.zenmagick.core\ZMObject
properties_
Method Summary
void

__construct(ZMDatabase database, string sql, array args, string modelClass, string countCol, mixed mapping)

Create new instance.

array

getArgs()

Get the query parameter.

string

getCountCol()

Get the count column SQL.

string

getDatabase()

Get the database.

mixed

getMapping()

Get the query mapping.

string

getModelClass()

Get the query model class.

string

getSql()

Get the sql.

mixed

query(string sql)

Execute the query with either the original or alternative SQL.

Methods inherited from org.zenmagick.core\ZMObject
__construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton

Method Detail

core\services\database\ZMQueryDetails.php at line 51

__construct

public void __construct(ZMDatabase database, string sql, array args, string modelClass, string countCol, mixed mapping)

Create new instance.

The parameters here correspond to ZMDatabase#query().

Parameters:
database - The database.
sql - The sql.
args - Database query parameter; default is array().
mapping - The field mappings; default is null.
modelClass - The class name; default is null.
countCol - The column SQL to use for counting; default is null to compute.

core\services\database\ZMQueryDetails.php at line 85

getArgs

public array getArgs()

Get the query parameter.

Returns:
The parameter.

core\services\database\ZMQueryDetails.php at line 112

getCountCol

public string getCountCol()

Get the count column SQL.

Returns:
The SQL fragment.

core\services\database\ZMQueryDetails.php at line 67

getDatabase

public string getDatabase()

Get the database.

Returns:
The database.

core\services\database\ZMQueryDetails.php at line 94

getMapping

public mixed getMapping()

Get the query mapping.

Returns:
The mapping.

core\services\database\ZMQueryDetails.php at line 103

getModelClass

public string getModelClass()

Get the query model class.

Returns:
The model class.

core\services\database\ZMQueryDetails.php at line 76

getSql

public string getSql()

Get the sql.

Returns:
The sql.

core\services\database\ZMQueryDetails.php at line 122

query

public mixed query(string sql)

Execute the query with either the original or alternative SQL.

Parameters:
sql - Optional sql; default is null to use the original SQL.
Returns:
array Results.

ZenMagick 0.9.10