ADODB_postgres64 Class Reference

Inheritance diagram for ADODB_postgres64:

ADOConnection ADODB_netezza ADODB_postgres7 List of all members.

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)
 _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"
 cache for 1 hour
 $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
 $ADODB_FETCH_MODE = ADODB_FETCH_NUM
 $rs = $this->Execute(sprintf($sql,$table,$table,$schema))
 $indexes = array()
return $indexes

Detailed Description

Definition at line 57 of file adodb-postgres64.inc.php.


Constructor & Destructor Documentation

ADODB_postgres64.ADODB_postgres64  ) 
 

Definition at line 119 of file adodb-postgres64.inc.php.


Member Function Documentation

ADODB_postgres64._affectedrows  ) 
 

Definition at line 165 of file adodb-postgres64.inc.php.

ADODB_postgres64._close  ) 
 

Definition at line 817 of file adodb-postgres64.inc.php.

ADODB_postgres64._connect str,
user = '',
pwd = '',
db = '',
ctype = 0
 

Definition at line 642 of file adodb-postgres64.inc.php.

ADODB_postgres64._errconnect  ) 
 

Definition at line 781 of file adodb-postgres64.inc.php.

ADODB_postgres64._insertid table,
column
 

Definition at line 155 of file adodb-postgres64.inc.php.

ADODB_postgres64._nconnect argHostname,
argUsername,
argPassword,
argDatabaseName
 

Reimplemented from ADOConnection.

Definition at line 686 of file adodb-postgres64.inc.php.

ADODB_postgres64._pconnect str,
user = '',
pwd = '',
db = ''
 

Definition at line 696 of file adodb-postgres64.inc.php.

ADODB_postgres64._query sql,
inputarr
 

Reimplemented in ADODB_postgres7.

Definition at line 703 of file adodb-postgres64.inc.php.

ADODB_postgres64.BeginTrans  ) 
 

Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans().

Returns:
true if succeeded or false if database does not support transactions

Reimplemented from ADOConnection.

Definition at line 173 of file adodb-postgres64.inc.php.

ADODB_postgres64.BlobDecode blob,
maxsize = false,
hastrans = true
 

Definition at line 401 of file adodb-postgres64.inc.php.

ADODB_postgres64.BlobDelete blob  ) 
 

Definition at line 372 of file adodb-postgres64.inc.php.

ADODB_postgres64.BlobEncode blob  ) 
 

Reimplemented from ADOConnection.

Definition at line 425 of file adodb-postgres64.inc.php.

ADODB_postgres64.CharMax  ) 
 

Definition at line 833 of file adodb-postgres64.inc.php.

ADODB_postgres64.CommitTrans ok = true  ) 
 

If database does not support transactions, always return true as data always commited

Parameters:
$ok set to false to rollback transaction, true to commit
Returns:
true/false.

Reimplemented from ADOConnection.

Definition at line 187 of file adodb-postgres64.inc.php.

ADODB_postgres64.ErrorMsg  ) 
 

Returns:
the last error message

Reimplemented from ADOConnection.

Definition at line 788 of file adodb-postgres64.inc.php.

ADODB_postgres64.ErrorNo  ) 
 

Returns:
the last error number. Normally 0 means no error.

Reimplemented from ADOConnection.

Definition at line 807 of file adodb-postgres64.inc.php.

ADODB_postgres64.GuessOID oid  ) 
 

Definition at line 383 of file adodb-postgres64.inc.php.

ADODB_postgres64.IfNull field,
ifNull
 

Reimplemented from ADOConnection.

Definition at line 134 of file adodb-postgres64.inc.php.

& ADODB_postgres64.MetaTables ttype = false,
showSchema = false,
mask = false
 

Parameters:
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
Returns:
array of tables for current database.

Reimplemented from ADOConnection.

Definition at line 204 of file adodb-postgres64.inc.php.

ADODB_postgres64.pg_insert_id tablename,
fieldname
 

Definition at line 140 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());

Parameters:
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.
Returns:
quoted string to be sent back to database

Reimplemented from ADOConnection.

Definition at line 237 of file adodb-postgres64.inc.php.

ADODB_postgres64.RollbackTrans  ) 
 

If database does not support transactions, rollbacks always fail, so return false

Returns:
true/false.

Reimplemented from ADOConnection.

Definition at line 197 of file adodb-postgres64.inc.php.

ADODB_postgres64.RowLock tables,
where,
flds = '1 as ignore'
 

Definition at line 180 of file adodb-postgres64.inc.php.

ADODB_postgres64.ServerInfo  ) 
 

Get server version info...

Returns:
An array with 2 elements: $arr['string'] is the description string, and $arr[version] is the version (also a string).

Reimplemented from ADOConnection.

Definition at line 124 of file adodb-postgres64.inc.php.

ADODB_postgres64.SQLDate fmt,
col = false
 

Reimplemented from ADOConnection.

Definition at line 257 of file adodb-postgres64.inc.php.

ADODB_postgres64.TextMax  ) 
 

Definition at line 841 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 344 of file adodb-postgres64.inc.php.


Member Data Documentation

ADODB_postgres64.$_bindInputArray = false
 

A boolean variable to state whether its a persistent connection or normal connection. */.

Reimplemented from ADOConnection.

Definition at line 108 of file adodb-postgres64.inc.php.

ADODB_postgres64.$_dropSeqSQL = "DROP SEQUENCE %s"
 

Definition at line 102 of file adodb-postgres64.inc.php.

ADODB_postgres64.$_genIDSQL = "SELECT NEXTVAL('%s')"
 

Definition at line 100 of file adodb-postgres64.inc.php.

ADODB_postgres64.$_genSeqSQL = "CREATE SEQUENCE %s START %s"
 

Definition at line 101 of file adodb-postgres64.inc.php.

ADODB_postgres64.$_resultid = false
 

Reimplemented in ADODB_netezza.

Definition at line 61 of file adodb-postgres64.inc.php.

ADODB_postgres64.$ADODB_FETCH_MODE = ADODB_FETCH_NUM
 

Definition at line 605 of file adodb-postgres64.inc.php.

ADODB_postgres64.$autoRollback = true
 

random function

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 105 of file adodb-postgres64.inc.php.

ADODB_postgres64.$blobEncodeType = 'C'
 

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 73 of file adodb-postgres64.inc.php.

ADODB_postgres64.$concat_operator = '||'
 

maximum size of blobs or large text fields (262144 = 256K)-- some db's die otherwise like foxpro

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 62 of file adodb-postgres64.inc.php.

ADODB_postgres64.$databaseType = 'postgres64'
 

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza, and ADODB_postgres7.

Definition at line 58 of file adodb-postgres64.inc.php.

ADODB_postgres64.$dataProvider = 'postgres'
 

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 59 of file adodb-postgres64.inc.php.

ADODB_postgres64.$disableBlobs = false
 

Definition at line 109 of file adodb-postgres64.inc.php.

ADODB_postgres64.$false = 'FALSE'
 

string that represents TRUE for a database

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 95 of file adodb-postgres64.inc.php.

ADODB_postgres64.$fmtDate = "'Y-m-d'"
 

uppercase function

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 96 of file adodb-postgres64.inc.php.

ADODB_postgres64.$fmtTimeStamp = "'Y-m-d H:i:s'"
 

used by DBDate() as the default date format used by the database

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 97 of file adodb-postgres64.inc.php.

ADODB_postgres64.$hasAffectedRows = true
 

supports autoincrement ID?

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 91 of file adodb-postgres64.inc.php.

ADODB_postgres64.$hasGenID = true
 

has ability to run MoveFirst(), scrolling backwards

Reimplemented from ADOConnection.

Definition at line 99 of file adodb-postgres64.inc.php.

ADODB_postgres64.$hasInsertID = true
 

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 60 of file adodb-postgres64.inc.php.

ADODB_postgres64.$hasLimit = false
 

support mssql/access SELECT TOP 10 * FROM TABLE

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza, and ADODB_postgres7.

Definition at line 92 of file adodb-postgres64.inc.php.

ADODB_postgres64.$hasMoveFirst = true
 

this is a readonly database - used by phpLens

Reimplemented from ADOConnection.

Definition at line 98 of file adodb-postgres64.inc.php.

return ADODB_postgres64.$indexes
 

Definition at line 634 of file adodb-postgres64.inc.php.

ADODB_postgres64.$indexes = array()
 

Definition at line 622 of file adodb-postgres64.inc.php.

ADODB_postgres64.$isoDates = true
 

error function to call

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 70 of file adodb-postgres64.inc.php.

ADODB_postgres64.$metaColumnsSQL
 

Initial value:

 "SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum 
                FROM pg_class c, pg_attribute a,pg_type t 
                WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) and a.attname not like '....%%'
AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum"

Reimplemented in ADODB_netezza.

Definition at line 74 of file adodb-postgres64.inc.php.

ADODB_postgres64.$metaColumnsSQL1
 

Initial value:

 "SELECT a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, a.attnum 
FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n 
WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
 and c.relnamespace=n.oid and n.nspname='%s' 
        and a.attname not like '....%%' AND a.attnum > 0 
        AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum"

Reimplemented in ADODB_netezza.

Definition at line 80 of file adodb-postgres64.inc.php.

ADODB_postgres64.$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

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 63 of file adodb-postgres64.inc.php.

ADODB_postgres64.$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"
 

Definition at line 103 of file adodb-postgres64.inc.php.

ADODB_postgres64.$metaKeySQL
 

Initial value:

 "SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key 
        FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = '%s'"

Reimplemented in ADODB_netezza.

Definition at line 88 of file adodb-postgres64.inc.php.

ADODB_postgres64.$metaTablesSQL
 

Initial value:

 "select tablename,'T' from pg_tables where tablename not like 'pg\_%'
        and tablename not in ('sql_features', 'sql_implementation_info', 'sql_languages',
         'sql_packages', 'sql_sizing', 'sql_sizing_profiles') 
        union 
        select viewname,'V' from pg_views where viewname not like 'pg\_%'"

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 64 of file adodb-postgres64.inc.php.

ADODB_postgres64.$random = 'random()'
 

string length ofperator

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 104 of file adodb-postgres64.inc.php.

ADODB_postgres64.$rs = $this->Execute(sprintf($sql,$table,$table,$schema))
 

Definition at line 610 of file adodb-postgres64.inc.php.

ADODB_postgres64.$sysDate = "CURRENT_DATE"
 

cache for 1 hour

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 71 of file adodb-postgres64.inc.php.

ADODB_postgres64.$sysTimeStamp = "CURRENT_TIMESTAMP"
 

name of function that returns the current date

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 72 of file adodb-postgres64.inc.php.

ADODB_postgres64.$true = 'TRUE'
 

used by DBTimeStamp as the default timestamp fmt.

Reimplemented from ADOConnection.

Reimplemented in ADODB_netezza.

Definition at line 94 of file adodb-postgres64.inc.php.


The documentation for this class was generated from the following file:
Generated on Fri Apr 7 10:48:44 2006 for TYPO3 by  doxygen 1.4.6