PACK PHP-Binding
$VERSION$
|
Public Member Functions | |
__construct ($server, $user, $pass) | |
__destruct () | |
setPrefix ($pre) | |
setDbName ($dbn) | |
dbName () | |
return the name of the database More... | |
setStorageEngine ($e) | |
setCharacterSet ($cs, $col="%_bin") | |
tryConnect () | |
isConnected () | |
check whether the DB object is connected to an actual database More... | |
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) | |
escapeBool ($b) | |
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) | |
unlockDB () | |
createTable ($tn, $t) | |
sqlCreateTable ($tn, $t) | |
createTableExtras ($tablename, $table) | |
upgradeTable ($tablename, $doexec) | |
dataType ($type) | |
columnFlag ($flag, $col, $table, $cflags) | |
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 |
MySQL adaptation of DB-Engine
MysqlEngine::__construct | ( | $server, | |
$user, | |||
$pass | |||
) |
initialize driver
MysqlEngine::__destruct | ( | ) |
make sure it shuts down
MysqlEngine::beginTransaction | ( | ) |
|
protected |
MysqlEngine::commitTransaction | ( | ) |
|
protected |
|
protected |
|
protected |
MysqlEngine::dbName | ( | ) |
return the name of the database
MysqlEngine::deleteRows | ( | $table, | |
$where | |||
) |
MysqlEngine::escapeBlob | ( | $s | ) |
escapes blobs; it uses mysqli_escape_string and encloses the value in '' - blobs are binary strings in MySQL
MysqlEngine::escapeBool | ( | $b | ) |
escapes booleans, overwrites the orignal to use "0" and "1" instead of "FALSE" and "TRUE"
MysqlEngine::escapeString | ( | $s | ) |
escapes strings; it uses mysqli_escape_string and encloses the value in ''
MysqlEngine::hasTable | ( | $tnm | ) |
MysqlEngine::insert | ( | $table, | |
array | $values | ||
) |
MysqlEngine::isConnected | ( | ) |
check whether the DB object is connected to an actual database
MysqlEngine::lastError | ( | ) |
|
protected |
MysqlEngine::rollbackTransaction | ( | ) |
MysqlEngine::select | ( | $table, | |
$cols, | |||
$where = "" , |
|||
$orderby = "" |
|||
) |
MysqlEngine::setCharacterSet | ( | $cs, | |
$col = "%_bin" |
|||
) |
set the default charset and collation for tables and connections
cs | the character set - like 'latin1' or 'utf8', this must be a charset supported by MySQL, the default is 'utf8' |
col | the collation to be used, the default is to use the corresponding binary collation (if you specify an empty string the default of MySQL will be used, which is a case independent comparison!) |
MysqlEngine::setDbName | ( | $dbn | ) |
set the name of the database to be used
MysqlEngine::setPrefix | ( | $pre | ) |
set a table-name prefix for the database
MysqlEngine::setStorageEngine | ( | $e | ) |
set the name of the storage engine to be used on DB creation
MysqlEngine::sqlBeginTransaction | ( | ) |
MysqlEngine::sqlCommitTransaction | ( | ) |
|
protected |
MysqlEngine::sqlRollbackTransaction | ( | ) |
MysqlEngine::tableName | ( | $tn | ) |
MysqlEngine::tryConnect | ( | ) |
|
protected |
MysqlEngine::update | ( | $table, | |
array | $values, | ||
$where | |||
) |
|
protected |
|
protected |
prefix for table names