Public Member Functions | |
KjwPgSql ($hostname, $portnum, $username, $password, $database) | |
Construct a KjwPgSql object. | |
destroy () | |
Destructor performing cleanup. | |
connect () | |
Connect to the SQL server. | |
disconnect () | |
Disconnect from the SQL server. | |
beginWork () | |
Begin a transaction / atomic operation. | |
execute ($query) | |
Execute a query. | |
safeQuote ($mixed) | |
Makes sure that any variable is quoted like its correct type should be. | |
nameQuote ($string) | |
Quote a name for an object (column or table). | |
affectedRows () | |
How many rows were affected (touched) by the last INSERT, UPDATE, REPLACE or DELETE query. | |
insertId () | |
Returns the id of the last INSERT clause that uses an IDENTITY/SEQUENCE/AUTO_INCREMENT value. | |
Public Attributes | |
$_dbconn | |
Database resource. |
Definition at line 29 of file KjwPgSql.php.
KjwPgSql::affectedRows | ( | ) |
How many rows were affected (touched) by the last INSERT, UPDATE, REPLACE or DELETE query.
It's unspecified if an UPDATE count includes updates that weren't actual changes. I.e. either the WHERE-match-count is returned, or only the subset where the update was a change.
Reimplemented from KjwSql.
Definition at line 116 of file KjwPgSql.php.
KjwPgSql::connect | ( | ) |
Connect to the SQL server.
Reimplemented from KjwSql.
Definition at line 53 of file KjwPgSql.php.
References KjwObject::croak().
Referenced by execute(), and safeQuote().
KjwPgSql::destroy | ( | ) |
Destructor performing cleanup.
Don't rely on this being called ever. The user must call it by hand.
Reimplemented from KjwSql.
Definition at line 47 of file KjwPgSql.php.
References disconnect().
KjwPgSql::disconnect | ( | ) |
Disconnect from the SQL server.
Reimplemented from KjwSql.
Definition at line 73 of file KjwPgSql.php.
Referenced by destroy().
KjwPgSql::execute | ( | $ | query | ) |
Execute a query.
$query | The query to execute. |
Reimplemented from KjwSql.
Definition at line 88 of file KjwPgSql.php.
References KjwSql::_setLastQuery(), connect(), and KjwObject::croak().
Referenced by beginWork().
KjwPgSql::insertId | ( | ) |
Returns the id of the last INSERT clause that uses an IDENTITY/SEQUENCE/AUTO_INCREMENT value.
Reimplemented from KjwSql.
Definition at line 121 of file KjwPgSql.php.
KjwPgSql::KjwPgSql | ( | $ | hostname, | |
$ | portnum, | |||
$ | username, | |||
$ | password, | |||
$ | database | |||
) |
Construct a KjwPgSql object.
$hostname | Server name or IP. | |
$portnum | Port number of 0 if default. | |
$username | User name. | |
$password | Password. | |
$database | Database name. |
Definition at line 41 of file KjwPgSql.php.
References KjwSql::KjwSql().
KjwPgSql::nameQuote | ( | $ | string | ) |
Quote a name for an object (column or table).
For MySQL this would be by surrounding the name with backticks.
$string | An identifier (column or table name) to be quoted. |
Reimplemented from KjwSql.
Definition at line 110 of file KjwPgSql.php.
KjwPgSql::safeQuote | ( | $ | mixed | ) |
Makes sure that any variable is quoted like its correct type should be.
Integers and booleans are returned as integers. Strings are returned as quoted strings with all quotes escaped. If the escaping mechanism is not known, all <32 and >127 characters REMOVED, otherwise the escaping for the specific database make is used.
$mixed | The variable that needs to be returned as a safe entity. |
Reimplemented from KjwSql.
Definition at line 100 of file KjwPgSql.php.
References connect().