Inheritance diagram for DboPostgres:

Public Member Functions | |
| _alterIndexes ($table, $indexes) | |
| _execute ($sql) | |
| alterSchema ($compare, $table=null) | |
| boolean ($data, $quote=true) | |
| buildColumn ($column) | |
| buildIndex ($indexes, $table=null) | |
| column ($real) | |
| connect () | |
| & | describe (&$model) |
| disconnect () | |
| fetchResult () | |
| fields (&$model, $alias=null, $fields=array(), $quote=true) | |
| getEncoding () | |
| getSequence ($table, $field= 'id') | |
| index ($model) | |
| lastAffected () | |
| lastError () | |
| lastInsertId ($source, $field= 'id') | |
| lastNumRows () | |
| length ($real) | |
| limit ($limit, $offset=null) | |
| listSources () | |
| name ($data) | |
| renderStatement ($type, $data) | |
| resultSet (&$results) | |
| setEncoding ($enc) | |
| truncate ($table, $reset=0) | |
| value ($data, $column=null, $read=true) | |
Public Attributes | |
| $_baseConfig | |
| $_commands | |
| $_sequenceMap = array() | |
| $columns | |
| $description = "PostgreSQL DBO Driver" | |
| $endQuote = '"' | |
| $startQuote = '"' | |
Definition at line 36 of file dbo_postgres.php.
| DboPostgres::_alterIndexes | ( | $ | table, | |
| $ | indexes | |||
| ) |
Generate PostgreSQL index alteration statements for a table.
| string | $table Table to alter indexes for | |
| array | $new Indexes to add and drop |
Definition at line 549 of file dbo_postgres.php.
References $out, column(), and name().
Referenced by alterSchema().
| DboPostgres::_execute | ( | $ | sql | ) |
Executes given SQL statement.
| string | $sql SQL statement |
Definition at line 147 of file dbo_postgres.php.
Referenced by connect().
| DboPostgres::alterSchema | ( | $ | compare, | |
| $ | table = null | |||
| ) |
Alter the Schema of a table.
| array | $compare Results of CakeSchema::compare() | |
| string | $table name of the table public |
Reimplemented from DboSource.
Definition at line 478 of file dbo_postgres.php.
References $out, _alterIndexes(), buildColumn(), column(), DboSource::fullTableName(), and name().
| DboPostgres::boolean | ( | $ | data, | |
| $ | quote = true | |||
| ) |
Translates between PHP boolean values and PostgreSQL boolean values
| mixed | $data Value to be translated | |
| boolean | $quote True to quote value, false otherwise |
Definition at line 737 of file dbo_postgres.php.
Referenced by fetchResult().
| DboPostgres::buildColumn | ( | $ | column | ) |
Generate a Postgres-native column schema string
| array | $column An array structured like the following: array('name'=>'value', 'type'=>'value'[, options]), where options can be 'default', 'length', or 'key'. |
Reimplemented from DboSource.
Definition at line 777 of file dbo_postgres.php.
References $out, length(), and limit().
Referenced by alterSchema().
| DboPostgres::buildIndex | ( | $ | indexes, | |
| $ | table = null | |||
| ) |
| DboPostgres::column | ( | $ | real | ) |
Converts database-layer column types to basic types
| string | $real Real database-layer column type (i.e. "varchar(255)") |
Reimplemented from DataSource.
Definition at line 612 of file dbo_postgres.php.
References limit(), and name().
Referenced by _alterIndexes(), alterSchema(), buildIndex(), describe(), and index().
| DboPostgres::connect | ( | ) |
Connects to the database using options in the given configuration array.
Definition at line 104 of file dbo_postgres.php.
References DataSource::$config, _execute(), config(), and setEncoding().
| & DboPostgres::describe | ( | &$ | model | ) |
Returns an array of the fields in given table name.
| string | $tableName Name of database table to inspect |
Definition at line 185 of file dbo_postgres.php.
References column(), config(), DboSource::fetchAll(), DboSource::fullTableName(), length(), name(), and value().
| DboPostgres::disconnect | ( | ) |
Disconnects from database.
Definition at line 130 of file dbo_postgres.php.
References DboSource::hasResult().
| DboPostgres::fetchResult | ( | ) |
Fetches the next row from the current result set
Definition at line 704 of file dbo_postgres.php.
References DboSource::$index, and boolean().
| DboPostgres::fields | ( | &$ | model, | |
| $ | alias = null, |
|||
| $ | fields = array(), |
|||
| $ | quote = true | |||
| ) |
Generates the fields list of an SQL query.
| Model | $model | |
| string | $alias Alias tablename | |
| mixed | $fields |
Reimplemented from DboSource.
Definition at line 401 of file dbo_postgres.php.
References DboSource::$alias, __(), and name().
| DboPostgres::getEncoding | ( | ) |
Gets the database encoding
Definition at line 766 of file dbo_postgres.php.
| DboPostgres::getSequence | ( | $ | table, | |
| $ | field = 'id' | |||
| ) |
Gets the associated sequence for the given table/field
| mixed | $table Either a full table name (with prefix) as a string, or a model object | |
| string | $field Name of the ID database field. Defaults to "id" |
Definition at line 346 of file dbo_postgres.php.
| DboPostgres::index | ( | $ | model | ) |
Returns an array of the indexes in given datasource name.
| string | $model Name of model to inspect |
Reimplemented from DboSource.
Definition at line 438 of file dbo_postgres.php.
References DboSource::$index, column(), config(), DboSource::fullTableName(), and DboSource::query().
| DboPostgres::lastAffected | ( | ) |
Returns number of affected rows in previous database operation. If no previous operation exists, this returns false.
Definition at line 315 of file dbo_postgres.php.
| DboPostgres::lastError | ( | ) |
Returns a formatted error message from previous database operation.
Definition at line 306 of file dbo_postgres.php.
| DboPostgres::lastInsertId | ( | $ | source, | |
| $ | field = 'id' | |||
| ) |
Returns the ID generated from the previous INSERT operation.
| string | $source Name of the database table | |
| string | $field Name of the ID database field. Defaults to "id" |
Definition at line 334 of file dbo_postgres.php.
| DboPostgres::lastNumRows | ( | ) |
Returns number of rows in previous resultset. If no previous resultset exists, this returns false.
Definition at line 324 of file dbo_postgres.php.
| DboPostgres::length | ( | $ | real | ) |
Gets the length of a database-native column description, or null if no length
| string | $real Real database-layer column type (i.e. "varchar(255)") |
Reimplemented from DboSource.
Definition at line 660 of file dbo_postgres.php.
Referenced by buildColumn(), and describe().
| DboPostgres::limit | ( | $ | limit, | |
| $ | offset = null | |||
| ) |
Returns a limit statement in the correct format for the particular database.
| integer | $limit Limit of results returned | |
| integer | $offset Offset from which to start results |
Reimplemented from DboSource.
Definition at line 590 of file dbo_postgres.php.
Referenced by buildColumn(), and column().
| DboPostgres::listSources | ( | ) |
Returns an array of tables in the database. If there are no tables, an error is raised and the application exits.
Definition at line 155 of file dbo_postgres.php.
References config(), DboSource::fetchAll(), and name().
| DboPostgres::name | ( | $ | data | ) |
Prepares field names to be quoted by parent
| string | $data |
Reimplemented from DboSource.
Definition at line 387 of file dbo_postgres.php.
Referenced by _alterIndexes(), alterSchema(), buildIndex(), column(), describe(), fields(), and listSources().
| DboPostgres::renderStatement | ( | $ | type, | |
| $ | data | |||
| ) |
Overrides DboSource::renderStatement to handle schema generation with Postgres-style indexes
| string | $type | |
| array | $data |
Reimplemented from DboSource.
Definition at line 840 of file dbo_postgres.php.
References $columns, and DboSource::$index.
| DboPostgres::resultSet | ( | &$ | results | ) |
Enter description here...
| unknown_type | $results |
Definition at line 680 of file dbo_postgres.php.
References DboSource::$index, and __().
| DboPostgres::setEncoding | ( | $ | enc | ) |
Sets the database encoding
| mixed | $enc Database encoding |
Definition at line 758 of file dbo_postgres.php.
Referenced by connect().
| DboPostgres::truncate | ( | $ | table, | |
| $ | reset = 0 | |||
| ) |
Deletes all the records in a table and drops all associated auto-increment sequences
| mixed | $table A string or model class representing the table to be truncated | |
| integer | $reset If -1, sequences are dropped, if 0 (default), sequences are reset, and if 1, sequences are not modified |
Definition at line 365 of file dbo_postgres.php.
| DboPostgres::value | ( | $ | data, | |
| $ | column = null, |
|||
| $ | read = true | |||
| ) |
Returns a quoted and escaped string of $data for use in an SQL statement.
| string | $data String to be prepared for use in an SQL statement | |
| string | $column The column into which this data will be inserted | |
| boolean | $read Value to be used in READ or WRITE context |
Reimplemented from DboSource.
Definition at line 260 of file dbo_postgres.php.
Referenced by describe().
| DboPostgres::$_baseConfig |
Initial value:
array(
'connect' => 'pg_pconnect',
'persistent' => true,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => 'cake',
'schema' => 'public',
'port' => 5432,
'encoding' => ''
)
Reimplemented from DataSource.
Definition at line 61 of file dbo_postgres.php.
| DboPostgres::$_commands |
| DboPostgres::$_sequenceMap = array() |
Definition at line 98 of file dbo_postgres.php.
| DboPostgres::$columns |
Initial value:
array(
'primary_key' => array('name' => 'serial NOT NULL'),
'string' => array('name' => 'varchar', 'limit' => '255'),
'text' => array('name' => 'text'),
'integer' => array('name' => 'integer', 'formatter' => 'intval'),
'float' => array('name' => 'float', 'formatter' => 'floatval'),
'datetime' => array('name' => 'timestamp', 'format' => 'Y-m-d H:i:s', 'formatter' => 'date'),
'timestamp' => array('name' => 'timestamp', 'format' => 'Y-m-d H:i:s', 'formatter' => 'date'),
'time' => array('name' => 'time', 'format' => 'H:i:s', 'formatter' => 'date'),
'date' => array('name' => 'date', 'format' => 'Y-m-d', 'formatter' => 'date'),
'binary' => array('name' => 'bytea'),
'boolean' => array('name' => 'boolean'),
'number' => array('name' => 'numeric'),
'inet' => array('name' => 'inet')
)
Definition at line 73 of file dbo_postgres.php.
Referenced by renderStatement().
| DboPostgres::$description = "PostgreSQL DBO Driver" |
| DboPostgres::$endQuote = '"' |
| DboPostgres::$startQuote = '"' |
1.4.7