IDBDriver Interface Reference
[Interfaces]
Defines a db driver, e.g for MySQL or PostgreSQL. More...
Public Member Functions |
|
escape ($value) | |
Escape given value. |
|
escape_database_entity ($obj, $type=self::FIELD) | |
Escape given database object, like table,
field etc. |
|
execute ($sql) | |
Execute an SQL command (Insert, Update.
|
|
explain ($sql) | |
Explain the given query. |
|
get_db_name () | |
Returns name of DB.
|
|
get_driver_name () | |
Return name of driver, e.g "mysql". |
|
get_host () | |
Returns host name of database. |
|
get_status () | |
Return current status. |
|
has_feature ($feature) | |
Returns true, if a given feature is
supported. |
|
initialize ($dbname, $user= '', $password= '', $host= 'localhost', $params=false) | |
Connect to DB. |
|
last_insert_id () | |
Get last insert ID. |
|
make_default () | |
Make this driver the default driver.
|
|
query ($sql) | |
Execute a Select statement. |
|
quote ($value) | |
Quote given value. |
|
trans_commit () | |
Commit transaction. |
|
trans_rollback () | |
Rollback transaction. |
|
trans_start () | |
Start transaction. |
|
Public Attributes |
|
const | ALIAS = 'ALIAS' |
const | FEATURE_REPLACE = 'replace' |
const | FIELD = 'FIELD' |
const | TABLE = 'TABLE' |
Detailed Description
Defines a db driver, e.g for MySQL or PostgreSQL.
Definition at line 8 of file idbdriver.cls.php.
Member Function Documentation
IDBDriver::escape | ( | $ | value | ) |
IDBDriver::escape_database_entity | ( | $ | obj, | |
$ | type = self::FIELD |
|||
) |
Escape given database object, like table, field etc.
- Parameters:
-
string $obj string $type What to escape, field, table, or alias
Implemented in DBDriverMysql.
IDBDriver::execute | ( | $ | sql | ) |
Execute an SQL command (Insert, Update.
..)
- Parameters:
-
string $sql
- Returns:
- Status
Implemented in DBDriverMysql.
IDBDriver::explain | ( | $ | sql | ) |
Explain the given query.
- Since:
- 0.5.1
- Parameters:
-
string $sql
- Returns:
- IDBResultSet False if quey cant be explain or driver does not support it
Implemented in DBDriverMysql.
IDBDriver::get_db_name | ( | ) |
IDBDriver::get_driver_name | ( | ) |
IDBDriver::get_host | ( | ) |
IDBDriver::get_status | ( | ) |
IDBDriver::has_feature | ( | $ | feature | ) |
Returns true, if a given feature is supported.
- Parameters:
-
string feature
- Returns:
- bool
Implemented in DBDriverMysql.
IDBDriver::initialize | ( | $ | dbname, | |
$ | user = '' , |
|||
$ | password = '' , |
|||
$ | host =
'localhost' , |
|||
$ | params = false |
|||
) |
Connect to DB.
- Parameters:
-
string $dbname Name of DB string $user Username string $password Password string $host Host mixed $params Driver dependend
Implemented in DBDriverMysql.
IDBDriver::last_insert_id | ( | ) |
Get last insert ID.
Implemented in DBDriverMysql.
IDBDriver::make_default | ( | ) |
IDBDriver::query | ( | $ | sql | ) |
Execute a Select statement.
- Parameters:
-
string $sql
- Returns:
- IDBResultSet
Implemented in DBDriverMysql.
IDBDriver::quote | ( | $ | value | ) |
IDBDriver::trans_commit | ( | ) |
Commit transaction.
Implemented in DBDriverMysql.
IDBDriver::trans_rollback | ( | ) |
Rollback transaction.
Implemented in DBDriverMysql.
IDBDriver::trans_start | ( | ) |
Start transaction.
Implemented in DBDriverMysql.
Member Data Documentation
const IDBDriver::ALIAS = 'ALIAS' |
Definition at line 12 of file idbdriver.cls.php.
const IDBDriver::FEATURE_REPLACE = 'replace' |
Definition at line 9 of file idbdriver.cls.php.
const IDBDriver::FIELD = 'FIELD' |
Definition at line 13 of file idbdriver.cls.php.
const IDBDriver::TABLE = 'TABLE' |
Definition at line 11 of file idbdriver.cls.php.
The documentation for this interface was generated from the following file:
- gyro/core/lib/interfaces/idbdriver.cls.php