Class: DB_pgsql
Source Location: /DB-1.9.2/DB/pgsql.php
PEAR
|
--DB_common
|
--DB_pgsql
The methods PEAR DB uses to interact with PHP's pgsql extension for interacting with PostgreSQL databases
Author(s):
Version:
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
__construct (Constructor) [line 155]
This constructor calls parent::__construct()
Overrides DB_common::__construct() (This constructor calls $this->PEAR('DB_Error'))
affectedRows [line 640]
Determines the number of rows affected by a data maniuplation query - is returned for queries that don't manipulate data.
Overrides DB_common::affectedRows() (Determines the number of rows affected by a data maniuplation query)
autoCommit [line 580]
int autoCommit(
[bool
$onoff = false])
|
|
Enables or disables automatic commits
Overrides DB_common::autoCommit() (Enables or disables automatic commits)
Parameters:
commit [line 596]
Commits the current transaction
Overrides DB_common::commit() (Commits the current transaction)
connect [line 209]
int connect(
array
$dsn, [bool
$persistent = false])
|
|
Connect to the database server, log in and open the database Don't call this method directly. Use DB::connect() instead. PEAR DB's pgsql driver supports the following extra DSN options: - connect_timeout How many seconds to wait for a connection to
be established. Available since PEAR DB 1.7.0.
- new_link If set to true, causes subsequent calls to
connect() to return a new connection link
instead of the existing one. WARNING: this is
not portable to other DBMS's. Available only
if PHP is >= 4.3.0 and PEAR DB is >= 1.7.0.
- options Command line options to be sent to the server.
Available since PEAR DB 1.6.4.
- service Specifies a service name in pg_service.conf that
holds additional connection parameters.
Available since PEAR DB 1.7.0.
- sslmode How should SSL be used when connecting? Values:
disable, allow, prefer or require.
Available since PEAR DB 1.7.0.
- tty This was used to specify where to send server
debug output. Available since PEAR DB 1.6.4.
Example of connecting to a new link via a socket: require_once 'DB.php';
$dsn = 'pgsql://user:pass@unix(/tmp)/dbname?new_link=true';
$options = array(
);
if (PEAR::isError($db)) {
die($db->getMessage());
}
Parameters:
createSequence [line 703]
int createSequence(
string
$seq_name)
|
|
Creates a new sequence
Overrides DB_common::createSequence() (Creates a new sequence)
Parameters:
disconnect [line 302]
Disconnects from the database server
dropSequence [line 723]
errorCode [line 806]
integer errorCode(
string
$errormsg)
|
|
Determines PEAR::DB error code from the database's text error message.
Overrides DB_common::errorCode() (Maps native error codes to DB's portable ones)
Parameters:
errorNative [line 792]
Gets the DBMS' native error message produced by the last query
Overrides DB_common::errorNative() (Gets the DBMS' native error code produced by the last query)
escapeSimple [line 500]
string escapeSimple(
string
$str)
|
|
Escapes a string according to the current DBMS's standards
Overrides DB_common::escapeSimple() (Escapes a string according to the current DBMS's standards)
Parameters:
fetchInto [line 413]
mixed fetchInto(
resource
$result,
&$arr, int
$fetchmode, [int
$rownum = null], array
$arr)
|
|
Places a row from the result set into the given array Formating of the array and the data therein are configurable. See DB_result::fetchInto() for more information. This method is not meant to be called directly. Use DB_result::fetchInto() instead. It can't be declared "protected" because DB_result is a separate object.
Parameters:
freeResult [line 457]
bool freeResult(
resource
$result)
|
|
Deletes the result set and frees the memory occupied by the result set This method is not meant to be called directly. Use DB_result::free() instead. It can't be declared "protected" because DB_result is a separate object.
Parameters:
getSpecialQuery [line 1044]
string getSpecialQuery(
string
$type)
|
|
Obtains the query string needed for listing a given type of objects
Overrides DB_common::getSpecialQuery() (Obtains the query string needed for listing a given type of objects)
Parameters:
modifyLimitQuery [line 748]
string modifyLimitQuery(
string
$query, int
$from, int
$count, [mixed
$params = array()])
|
|
Adds LIMIT clauses to a query string according to current DBMS standards
Overrides DB_common::modifyLimitQuery() (Adds LIMIT clauses to a query string according to current DBMS standards)
Parameters:
nextId [line 661]
int nextId(
string
$seq_name, [boolean
$ondemand = true])
|
|
Returns the next free id in a sequence
Overrides DB_common::nextId() (Returns the next free id in a sequence)
Parameters:
nextResult [line 385]
true nextResult(
a
$result)
|
|
Move the internal pgsql result pointer to the next available result
Parameters:
numCols [line 535]
int numCols(
resource
$result)
|
|
Gets the number of columns in a result set This method is not meant to be called directly. Use DB_result::numCols() instead. It can't be declared "protected" because DB_result is a separate object.
Parameters:
numRows [line 560]
int numRows(
resource
$result)
|
|
Gets the number of rows in a result set This method is not meant to be called directly. Use DB_result::numRows() instead. It can't be declared "protected" because DB_result is a separate object.
Overrides DB_common::numRows() (Determines the number of rows in a query result)
Parameters:
pgsqlRaiseError [line 768]
object the pgsqlRaiseError(
[int
$errno = null])
|
|
Produces a DB_Error object regarding the current problem
Parameters:
quoteBoolean [line 480]
string quoteBoolean(
boolean
$boolean)
|
|
Formats a boolean value for use within a query in a locale-independent manner.
Overrides DB_common::quoteBoolean() (Formats a boolean value for use within a query in a locale-independent manner.)
Parameters:
rollback [line 618]
simpleQuery [line 321]
mixed simpleQuery(
string
$query)
|
|
Sends a query to the database server
Parameters:
tableInfo [line 883]
array tableInfo(
object|string
$result, [int
$mode = null])
|
|
Returns information about a table or a result set NOTE: only supports 'table' and 'flags' if $result is a table name.
Overrides DB_common::tableInfo() (Returns information about a table or a result set)
Parameters:
_checkManip [line 1108]
boolean _checkManip(
string
$query)
|
|
Checks if the given query is a manipulation query. This also takes into account the _next_query_manip flag and sets the _last_query_manip flag (and resets _next_query_manip) according to the result.
Overrides DB_common::_checkManip() (Checks if the given query is a manipulation query. This also takes into account the _next_query_manip flag and sets the _last_query_manip flag (and resets _next_query_manip) according to the result.)
Parameters:
Documentation generated on Mon, 11 Mar 2019 16:04:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|