Zend_Db_Adapter_AbstractClass for connecting to SQL databases and performing common operations.
Located in /Zend/Db/Adapter/Abstract.php (line 40)
| Class | Description |
|---|---|
Zend_Db_Adapter_Db2
|
|
Zend_Db_Adapter_Oracle
|
|
Zend_Db_Adapter_Pdo_Abstract
|
Class for connecting to SQL databases and performing common operations using PDO. |
array
$_config
= array() (line 48)
User-provided configuration
object|resource|null
$_connection
= null (line 69)
Database connection
integer
$_fetchMode
= Zend_Db::FETCH_ASSOC (line 55)
Fetch mode
Zend_Db_Profiler
$_profiler
(line 62)
Query profiler
Constructor __construct (line 86)
Constructor.
$config is an array of key/value pairs containing configuration options. These options are common to most adapters:
dbname => (string) The name of the database to user (required) username => (string) Connect to the database as this username (optional). password => (string) Password associated with the username (optional). host => (string) What host to connect to (default 127.0.0.1).
beginTransaction (line 166)
Leave autocommit mode and begin a transaction.
commit (line 180)
Commit a transaction and return to autocommit mode.
delete (line 260)
Deletes table rows based on a WHERE clause.
describeTable (line 506)
Returns the column descriptions for a table.
The return value is an associative array keyed by the column name, as returned by the RDBMS.
The value of each array element is an associative array with the following keys:
SCHEMA_NAME => string; name of database or schema TABLE_NAME => string; COLUMN_NAME => string; column name COLUMN_POSITION => number; ordinal position of column in table DATA_TYPE => string; SQL datatype name of column DEFAULT => string; default expression of column, null if none NULLABLE => boolean; true if column can have nulls LENGTH => number; length of CHAR/VARCHAR SCALE => number; scale of NUMERIC/DECIMAL PRECISION => number; precision of NUMERIC/DECIMAL UNSIGNED => boolean; unsigned property of an integer type PRIMARY => boolean; true if column is part of the primary key
fetchAll (line 300)
Fetches all SQL result rows as a sequential array.
Uses the current fetchMode for the adapter.
fetchAssoc (line 317)
Fetches all SQL result rows as an associative array.
The first column is the key, the entire row array is the value.
fetchCol (line 337)
Fetches the first column of all SQL result rows as an array.
The first column in each row is used as the array key.
fetchOne (line 371)
Fetches the first column of the first row of the SQL result.
fetchPairs (line 354)
Fetches all SQL result rows as an array of key-value pairs.
The first column is the key, the second column is the value.
fetchRow (line 386)
Fetches the first row of the SQL result.
Uses the current fetchMode for the adapter.
getConnection (line 117)
Returns the underlying database connection object or resource.
If not presently connected, this initiates the connection.
getFetchMode (line 287)
Get the fetch mode.
getQuoteIdentifierSymbol (line 464)
Returns the symbol the adapter uses for delimited identifiers.
insert (line 210)
Inserts a table row with specified data.
lastInsertId (line 537)
Gets the last inserted ID.
limit (line 569)
Adds an adapter-specific LIMIT clause to the SELECT statement.
listTables (line 478)
Returns a list of the tables in the database.
prepare (line 529)
Prepare a statement and return a PDOStatement-like object.
query (line 140)
Prepares and executes an SQL statement with bound data.
quote (line 402)
Safely quotes a value for an SQL statement.
If an array is passed as the value, the array values are quoted and then returned as a comma-separated string.
quoteIdentifier (line 449)
Quotes an identifier.
quoteInto (line 438)
Quotes a value and places into a piece of text at a placeholder.
The placeholder is a question-mark; all placeholders will be replaced with the quoted value. For example:
rollBack (line 194)
Roll back a transaction and return to autocommit mode.
select (line 277)
Creates and returns a new Zend_Db_Select object for this adapter.
setFetchMode (line 559)
Set the fetch mode.
update (line 234)
Updates table rows with specified data based on a WHERE clause.
_beginTransaction (line 542)
Begin a transaction.
_commit (line 547)
Commit a transaction.
_connect (line 521)
Creates a connection to the database.
_quote (line 514)
Quote a raw string.
_rollBack (line 552)
Roll-back a transaction.
Documentation generated on Wed, 21 Feb 2007 11:45:21 -0800 by phpDocumentor 1.3.1