

Public Member Functions | |
| ADODB_postgres64 () | |
| ServerInfo () | |
| IfNull ($field, $ifNull) | |
| pg_insert_id ($tablename, $fieldname) | |
| _insertid ($table, $column) | |
| _affectedrows () | |
| BeginTrans () | |
| RowLock ($tables, $where, $flds='1 as ignore') | |
| CommitTrans ($ok=true) | |
| RollbackTrans () | |
| & | MetaTables ($ttype=false, $showSchema=false, $mask=false) |
| qstr ($s, $magic_quotes=false) | |
| SQLDate ($fmt, $col=false) | |
| UpdateBlobFile ($table, $column, $path, $where, $blobtype='BLOB') | |
| BlobDelete ($blob) | |
| GuessOID ($oid) | |
| BlobDecode ($blob, $maxsize=false, $hastrans=true) | |
| BlobEncode ($blob) | |
| UpdateBlob ($table, $column, $val, $where, $blobtype='BLOB') | |
| OffsetDate ($dayFraction, $date=false) | |
| & | MetaColumns ($table, $normalize=true) |
| & | MetaIndexes ($table, $primary=FALSE) |
| _connect ($str, $user='', $pwd='', $db='', $ctype=0) | |
| _nconnect ($argHostname, $argUsername, $argPassword, $argDatabaseName) | |
| _pconnect ($str, $user='', $pwd='', $db='') | |
| _query ($sql, $inputarr) | |
| _errconnect () | |
| ErrorMsg () | |
| ErrorNo () | |
| _close () | |
| CharMax () | |
| TextMax () | |
Public Attributes | |
| $databaseType = 'postgres64' | |
| $dataProvider = 'postgres' | |
| $hasInsertID = true | |
| $_resultid = false | |
| $concat_operator = '||' | |
| maximum size of blobs or large text fields (262144 = 256K)-- some db's die otherwise like foxpro | |
| $metaDatabasesSQL = "select datname from pg_database where datname not in ('template0','template1') order by 1" | |
| character set to use - only for interbase, postgres and oci8 | |
| $metaTablesSQL | |
| $isoDates = true | |
| error function to call | |
| $sysDate = "CURRENT_DATE" | |
| Use 'true' to store the item compressed (uses zlib). | |
| $sysTimeStamp = "CURRENT_TIMESTAMP" | |
| name of function that returns the current date | |
| $blobEncodeType = 'C' | |
| $metaColumnsSQL | |
| $metaColumnsSQL1 | |
| $metaKeySQL | |
| $hasAffectedRows = true | |
| supports autoincrement ID? | |
| $hasLimit = false | |
| support mssql/access SELECT TOP 10 * FROM TABLE | |
| $true = 'TRUE' | |
| used by DBTimeStamp as the default timestamp fmt. | |
| $false = 'FALSE' | |
| string that represents TRUE for a database | |
| $fmtDate = "'Y-m-d'" | |
| uppercase function | |
| $fmtTimeStamp = "'Y-m-d H:i:s'" | |
| used by DBDate() as the default date format used by the database | |
| $hasMoveFirst = true | |
| this is a readonly database - used by phpLens | |
| $hasGenID = true | |
| has ability to run MoveFirst(), scrolling backwards | |
| $_genIDSQL = "SELECT NEXTVAL('%s')" | |
| $_genSeqSQL = "CREATE SEQUENCE %s START %s" | |
| $_dropSeqSQL = "DROP SEQUENCE %s" | |
| $metaDefaultsSQL = "SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname='%s' order by d.adnum" | |
| $random = 'random()' | |
| string length ofperator | |
| $autoRollback = true | |
| random function | |
| $_bindInputArray = false | |
| A boolean variable to state whether its a persistent connection or normal connection. */. | |
| $disableBlobs = false | |
Definition at line 57 of file adodb-postgres64.inc.php.
| ADODB_postgres64::ServerInfo | ( | ) |
Get server version info...
Reimplemented from ADOConnection.
Definition at line 124 of file adodb-postgres64.inc.php.
| ADODB_postgres64::BeginTrans | ( | ) |
Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans().
Reimplemented from ADOConnection.
Definition at line 173 of file adodb-postgres64.inc.php.
| ADODB_postgres64::CommitTrans | ( | $ | ok = true |
) |
If database does not support transactions, always return true as data always commited
| $ok | set to false to rollback transaction, true to commit |
Reimplemented from ADOConnection.
Definition at line 187 of file adodb-postgres64.inc.php.
| ADODB_postgres64::RollbackTrans | ( | ) |
If database does not support transactions, rollbacks always fail, so return false
Reimplemented from ADOConnection.
Definition at line 197 of file adodb-postgres64.inc.php.
| & ADODB_postgres64::MetaTables | ( | $ | ttype = false, |
|
| $ | showSchema = false, |
|||
| $ | mask = false | |||
| ) |
| ttype | can either be 'VIEW' or 'TABLE' or false. If false, both views and tables are returned. "VIEW" returns only views "TABLE" returns only tables | |
| showSchema | returns the schema/user with the table name, eg. USER.TABLE | |
| mask | is the input mask - only supported by oci8 and postgresql |
Reimplemented from ADOConnection.
Definition at line 204 of file adodb-postgres64.inc.php.
| ADODB_postgres64::qstr | ( | $ | s, | |
| $ | magic_quotes = false | |||
| ) |
Correctly quotes a string so that all strings are escaped. We prefix and append to the string single-quotes. An example is $db->qstr("Don't bother",magic_quotes_runtime());
| s | the string to quote | |
| [magic_quotes] | if $s is GET/POST var, set to get_magic_quotes_gpc(). This undoes the stupidity of magic quotes for GPC. |
Reimplemented from ADOConnection.
Definition at line 237 of file adodb-postgres64.inc.php.
| ADODB_postgres64::UpdateBlobFile | ( | $ | table, | |
| $ | column, | |||
| $ | path, | |||
| $ | where, | |||
| $ | blobtype = 'BLOB' | |||
| ) |
Usage: UpdateBlob('TABLE', 'COLUMN', '/path/to/file', 'ID=1');
$blobtype supports 'BLOB' and 'CLOB'
$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); $conn->UpdateBlob('blobtable','blobcol',$blobpath,'id=1');
Reimplemented from ADOConnection.
Definition at line 347 of file adodb-postgres64.inc.php.
| ADODB_postgres64::UpdateBlob | ( | $ | table, | |
| $ | column, | |||
| $ | val, | |||
| $ | where, | |||
| $ | blobtype = 'BLOB' | |||
| ) |
Update a blob column, given a where clause. There are more sophisticated blob handling functions that we could have implemented, but all require a very complex API. Instead we have chosen something that is extremely simple to understand and use.
Note: $blobtype supports 'BLOB' and 'CLOB', default is BLOB of course.
Usage to update a $blobvalue which has a primary key blob_id=1 into a field blobtable.blobcolumn:
UpdateBlob('blobtable', 'blobcolumn', $blobvalue, 'blob_id=1');
Insert example:
$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1');
Reimplemented from ADOConnection.
Definition at line 442 of file adodb-postgres64.inc.php.
| & ADODB_postgres64::MetaColumns | ( | $ | table, | |
| $ | normalize = true | |||
| ) |
List columns in a database as an array of ADOFieldObjects. See top of file for definition of object.
| $table | table name to query | |
| $normalize | makes table name case-insensitive (required by some databases) is optional database schema to use - not supported by all databases. |
Reimplemented from ADOConnection.
Reimplemented in ADODB_netezza.
Definition at line 467 of file adodb-postgres64.inc.php.
| ADODB_postgres64::ErrorMsg | ( | ) |
Reimplemented from ADOConnection.
Definition at line 801 of file adodb-postgres64.inc.php.
| ADODB_postgres64::ErrorNo | ( | ) |
Reimplemented from ADOConnection.
Definition at line 820 of file adodb-postgres64.inc.php.