ZMObject
|
+--ZMPdoDatabase
public class ZMPdoDatabase
extends ZMObject
| Fields inherited from org.zenmagick.ZMObject | |
|---|---|
| properties_ | |
| Constructor Summary | |
|---|---|
ZMPdoDatabase(array conf) Create a new instance. |
|
| Method Summary | |
|---|---|
| void | {@inheritDoc} / |
| void | commit() {@inheritDoc} / |
| void | createModel(mixed table, mixed model, mixed mapping) {@inheritDoc} / |
| void | {@inheritDoc} / |
| protected long | getExecutionTime(string start) Get the elapsed time since $start. |
| void | getMetaData(mixed table) {@inheritDoc} / |
| void | {@inheritDoc} / |
| void | getStats() {@inheritDoc} / |
| protected boolean | Does this instance allow nested transactions? |
| void | loadModel(mixed table, mixed key, mixed modelClass, mixed mapping) {@inheritDoc} / |
| protected A | prepareStatement(string sql, mixed args, array mapping) Create a prepared statement. |
| void | query(mixed sql, mixed args, mixed modelClass) {@inheritDoc} / |
| void | querySingle(mixed sql, mixed args, mixed modelClass) {@inheritDoc} / |
| void | removeModel(mixed table, mixed model, mixed mapping) {@inheritDoc} / |
| void | rollback() {@inheritDoc} / |
| protected array | translateRow(array row, array mapping) Translate a given raw database row with the given mapping. |
| void | update(mixed sql, mixed data) {@inheritDoc} / |
| void | updateModel(mixed table, mixed model, mixed mapping) {@inheritDoc} / |
| Methods inherited from org.zenmagick.ZMObject | |
|---|---|
| attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton | |
public ZMPdoDatabase(array conf)
Create a new instance.
Supports the custom configuration setting persistent (true | false)
public void beginTransaction()
/
public void commit()
/
public void createModel(mixed table, mixed model, mixed mapping)
/
public void getConfig()
/
protected long getExecutionTime(string start)
Get the elapsed time since $start.
public void getMetaData(mixed table)
/
public void getResource()
/
public void getStats()
/
protected boolean isNestedTransactions()
Does this instance allow nested transactions?
true if nested transactions are supported.public void loadModel(mixed table, mixed key, mixed modelClass, mixed mapping)
/
protected A prepareStatement(string sql, mixed args, array mapping)
Create a prepared statement.
PreparedStatement or null;public void query(mixed sql, mixed args, mixed modelClass)
/
public void querySingle(mixed sql, mixed args, mixed modelClass)
/
public void removeModel(mixed table, mixed model, mixed mapping)
/
public void rollback()
/
protected array translateRow(array row, array mapping)
Translate a given raw database row with the given mapping.
null).public void update(mixed sql, mixed data)
/
public void updateModel(mixed table, mixed model, mixed mapping)
/
Implementation of the ZenMagick database layer using PDO.
Support for nested transactions via
SAVEPOINTs inspired by http://www.kennynet.co.uk/2008/12/02/php-pdo-nested-transactions/.