ZenMagick 0.9.8


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

Class ZMQueryDetails

ZMObject
└─ZMQueryDetails

public class ZMQueryDetails
extends ZMObject

Query details as returned by the ZMSQLAware interface method.

Author:
DerManoMann
Version:
$Id: ZMQueryDetails.php 2610 2009-11-20 02:45:25Z dermanomann $

Fields inherited from org.zenmagick.core.ZMObject
properties_
Constructor Summary

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

Create new instance.

Method Summary
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
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

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

ZMQueryDetails

public ZMQueryDetails(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.

Method Detail

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

getArgs

public array getArgs()

Get the query parameter.

Returns:
The parameter.

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

getCountCol

public string getCountCol()

Get the count column SQL.

Returns:
The SQL fragment.

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

getDatabase

public string getDatabase()

Get the database.

Returns:
The database.

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

getMapping

public mixed getMapping()

Get the query mapping.

Returns:
The mapping.

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

getModelClass

public string getModelClass()

Get the query model class.

Returns:
The model class.

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

getSql

public string getSql()

Get the sql.

Returns:
The sql.

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

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.8