PACK PHP-Binding  $VERSION$
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PGsqlEngine Class Reference
Inheritance diagram for PGsqlEngine:
DbEngine

Public Member Functions

 __construct ($connstring)
 
 __destruct ()
 
 setPrefix ($pre)
 
 setCharacterSet ($c)
 
 tryConnect ()
 
 isConnected ()
 check whether the DB object is connected to an actual database More...
 
 dbName ()
 
 hasTable ($tnm)
 
 beginTransaction ()
 
 commitTransaction ()
 
 rollbackTransaction ()
 
 sqlBeginTransaction ()
 
 sqlCommitTransaction ()
 
 sqlRollbackTransaction ()
 
 select ($table, $cols, $where="", $orderby="")
 
 tableName ($tn)
 
 insert ($table, array $values)
 
 update ($table, array $values, $where)
 
 deleteRows ($table, $where)
 
 lastError ()
 
 escapeString ($s)
 
 escapeBlob ($s)
 
 syncSequence ($table)
 
 setDebugMode ($b=true, $a=false)
 
- Public Member Functions inherited from DbEngine
 tryConnect ()
 
 isConnected ()
 check whether the DB object is connected to an actual database More...
 
 setAdminPassCode ($u, $p)
 
 checkAdmin ()
 
 canAdministrate ()
 
 needVersion ()
 
 hasTable ($tablename)
 
 beginTransaction ()
 
 commitTransaction ()
 
 rollbackTransaction ()
 
 select ($table, $cols, $where="", $orderby="")
 
 insert ($table, array $values)
 
 update ($table, array $values, $where)
 
 deleteRows ($table, $where)
 
 dbName ()
 returns the name of the database the instance is connected to More...
 
 tableName ($tname)
 
 sqlSelect ($table, $cols, $where, $orderby)
 
 sqlBeginTransaction ()
 
 sqlCommitTransaction ()
 
 sqlRollbackTransaction ()
 
 escapeInt ($i)
 
 escapeIntList (array $il)
 
 escapeStringList (array $il)
 
 escapeListColumn (array $il, $table, $col)
 
 escapeString ($s)
 
 escapeBlob ($s)
 
 escapeBool ($s)
 
 escapeColumn ($table, $col, $val)
 
 getConfig ($key)
 
 setConfig ($key, $val)
 
 canUseDb ($checkVersion=true)
 
 createDb ()
 
 showCreateDb ()
 
 upgradeDb ($doexec=true)
 Upgrades the database, used by admin.php. More...
 
 lastError ()
 
 isNull ($val)
 
 transactionIsUpdating ()
 
 setTransactionUpdating ($tm)
 
 dumpBackup ()
 
 exploreBackup ()
 
 syncSequences ()
 
 syncSequence ($table)
 
 restoreData ($file, $overwrite)
 

Protected Member Functions

 lockDB ($wl)
 
 createTable ($tn, $t)
 
 upgradeTable ($tablename, $doexec)
 
 sqlCreateTable ($tn, $t)
 
 dataType ($type)
 
 columnFlag ($flag, $col, $table)
 
 unescapeBool ($b)
 
- Protected Member Functions inherited from DbEngine
 lockDB ($writelock)
 
 unlockDB ()
 
 createTable ($tablename, $table)
 
 dataType ($type)
 
 columnFlag ($flag, $col, $table, $cflags)
 
 sqlCreateTable ($tablename, $table)
 
 sqlCreateColumn ($tablename, $columnname, $columndef, $flags=self::COLUMN_CREATE_ALL)
 creates SQL92 part of a statement for creating a single column More...
 
 createTableExtras ($tablename, $table)
 
 sqlCreateTablePrimaryKey (array $cols)
 
 sqlCreateTableUniqueConstraint (array $constraints)
 creates the complex unique constraints; overwrite this to implement DB specific syntax More...
 
 sqlInsert ($table, array $values)
 
 sqlDelete ($table, $where)
 
 sqlUpdate ($table, array $values, $where)
 
 upgradeTable ($tablename, $doexec)
 helper for upgradeDb -> upgrades a single table More...
 

Protected Attributes

 $prefix =""
 
- Protected Attributes inherited from DbEngine
 $transmode =false
 

Additional Inherited Members

- Public Attributes inherited from DbEngine
const COLUMN_CREATE_TYPE = 1
 
const COLUMN_CREATE_NULL = 2
 
const COLUMN_CREATE_PKEY = 4
 
const COLUMN_CREATE_FKEY = 8
 
const COLUMN_CREATE_KEY = 12
 
const COLUMN_CREATE_DEFAULT = 16
 
const COLUMN_CREATE_INDEX = 32
 
const COLUMN_CREATE_CONSTRAINT = 64
 
const COLUMN_CREATE_ALL = 0xffff
 

Detailed Description

MySQL adaptation of DB-Engine

Constructor & Destructor Documentation

PGsqlEngine::__construct (   $connstring)

initialize driver

PGsqlEngine::__destruct ( )

make sure it shuts down

Member Function Documentation

PGsqlEngine::beginTransaction ( )
PGsqlEngine::columnFlag (   $flag,
  $col,
  $table 
)
protected
PGsqlEngine::commitTransaction ( )
PGsqlEngine::createTable (   $tn,
  $t 
)
protected
PGsqlEngine::dataType (   $type)
protected
PGsqlEngine::dbName ( )
PGsqlEngine::deleteRows (   $table,
  $where 
)
PGsqlEngine::escapeBlob (   $s)

escapes blobs; it uses mysqli_escape_string and encloses the value in '' - blobs are binary strings in MySQL

PGsqlEngine::escapeString (   $s)

escapes strings; it uses mysqli_escape_string and encloses the value in ''

PGsqlEngine::hasTable (   $tnm)
PGsqlEngine::insert (   $table,
array  $values 
)
PGsqlEngine::isConnected ( )

check whether the DB object is connected to an actual database

PGsqlEngine::lastError ( )
PGsqlEngine::lockDB (   $wl)
protected
PGsqlEngine::rollbackTransaction ( )
PGsqlEngine::select (   $table,
  $cols,
  $where = "",
  $orderby = "" 
)
PGsqlEngine::setCharacterSet (   $c)

set the default charset for tables and connections

PGsqlEngine::setDebugMode (   $b = true,
  $a = false 
)

development helper: activate debug mode

PGsqlEngine::setPrefix (   $pre)

set a table-name prefix for the database

PGsqlEngine::sqlBeginTransaction ( )
PGsqlEngine::sqlCommitTransaction ( )
PGsqlEngine::sqlCreateTable (   $tn,
  $t 
)
protected
PGsqlEngine::sqlRollbackTransaction ( )
PGsqlEngine::syncSequence (   $table)

synchronize the sequence of one database table

PGsqlEngine::tableName (   $tn)
PGsqlEngine::tryConnect ( )
PGsqlEngine::unescapeBool (   $b)
protected

internal: unescape a postgres bool towards PHP bool

PGsqlEngine::update (   $table,
array  $values,
  $where 
)
PGsqlEngine::upgradeTable (   $tablename,
  $doexec 
)
protected

Member Data Documentation

PGsqlEngine::$prefix =""
protected

prefix for table names


The documentation for this class was generated from the following file: