creole::common Namespace Reference

Class that contains some shared/default information for connections. More...


Detailed Description

Class that contains some shared/default information for connections.

Class that contains common/shared functionality for Statements.

This class implements many shared or common methods needed by resultset drivers.

Class that represents a shared code for handling emulated pre-compiled statements.

Classes may wish to extend this so as not to worry about the sleep/wakeup methods, etc.

In reality this class is not very useful yet, so there's not much incentive for drivers to extend this.

Author:
Hans Lellelid <hans@xmpl.org>
Version:
Revision
1.5

Many drivers do not take advantage of pre-compiling SQL statements; for these cases the precompilation is emulated. This emulation comes with slight penalty involved in parsing the queries, but provides other benefits such as a cleaner object model and ability to work with BLOB and CLOB values w/o needing special LOB-specific routines.

Author:
Hans Lellelid <hans@xmpl.org>
Version:
Revision
1.16

This class may (optionally) be extended by driver classes simply to make it easier to create driver classes. This is also useful in the early stages of Creole development as it means that API changes affect fewer files. As Creole matures/stabalizes having a common class may become less useful, as drivers may have their own ways of doing things (and we'll have a solid unit test framework to make sure drivers conform to the API described by the interfaces).

The get*() methods in this class will format values before returning them. Note that if they will return null if the database returned NULL which makes these functions easier to use than simply typecasting the values from the db. If the requested column does not exist than an exception (SQLException) will be thrown.

$rs = $conn->executeQuery("SELECT MAX(stamp) FROM event", ResultSet::FETCHMODE_NUM); $rs->next();

$max_stamp = $rs->getTimestamp(1, "d/m/Y H:i:s"); // $max_stamp will be date string or null if no MAX(stamp) was found

$max_stamp = $rs->getTimestamp("max(stamp)", "d/m/Y H:i:s"); // will THROW EXCEPTION, because the resultset was fetched using numeric indexing // SQLException: Invalid resultset column: max(stamp)

Author:
Hans Lellelid <hans@xmpl.org>
Version:
Revision
1.9

Author:
Hans Lellelid <hans@xmpl.org>
Version:
Revision
1.4


Generated on Wed May 6 23:10:50 2009 for fareofficelib by  doxygen 1.5.8