|
CaMykS
1.0-20250801
|
CaMykS Generic Database connection object.
To be extended by specific database connection objects.
More...
Public Member Functions | |
| __construct () | |
| connect_server ($host='localhost', $login='', $pwd='', $driver='') | |
| disconnect_server () | |
| is_connectionActive () | |
| check_status ($name) | |
| get_serverVersion () | |
| select_database ($name) | |
| create_database ($name, $charset='utf8') | |
| database_exists ($name) | |
| dump_database ($file=false) | |
| get_databaseSize () | |
| get_databaseSummary () | |
| get_tableList () | |
| create_table ($name, $fields, $charset='utf8', $autoId=true, $primaryKeys=array('id')) | |
| execute_query ($sql='', $resName='defaultRes') | |
| execute_multiQueries ($sql='', $resName='defaultRes') | |
| get_queryGeneratedId ($resName='defaultRes') | |
| get_queryDataLine ($resName='defaultRes') | |
| get_queryNumDataLine ($resName='defaultRes') | |
| get_queryError ($resName='defaultRes') | |
| get_queryAffectedRows ($resName='defaultRes') | |
| get_queryFieldCount ($resName='defaultRes') | |
| get_queryFieldType ($fIndex=0, $resName='defaultRes') | |
| close_ressource ($resName='defaultRes') | |
| escape_string ($string) | |
| get_insertExtra () | |
Protected Member Functions | |
| get_resName () | |
Protected Attributes | |
| $active = false | |
| CDBConnection status. More... | |
| $connection = null | |
| CDBConnection database ressource. More... | |
| $queryRes = array() | |
| Query ressources. More... | |
| $dbName = null | |
| Name of the database. More... | |
CaMykS Generic Database connection object.
To be extended by specific database connection objects.
Engine / Object Library
| CDBConnection::__construct | ( | ) |
Class constructor.
Reimplemented in SQLite3DBConnection.
|
abstract |
Connect to server.
| string | $host | |
| string | $login | |
| string | $pwd | |
| string | $driver |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Close server connection.
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
| CDBConnection::is_connectionActive | ( | ) |
Check if connection is active.
| CDBConnection::check_status | ( | $name | ) |
Check database status.
| string | $name |
|
abstract |
Return database engine version.
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Select database.
| string | $name |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Create a database.
| string | $name | |
| string | $charset |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Check if a base exists.
| string | $name |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Dump database.
| mixed | $file |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Return database size.
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Return database information summary.
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Return available table list.
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Create a table in the database.
| string | $name | |
| array | $fields | |
| string | $charset | |
| boolean | $autoId | |
| array | $primaryKeys |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Execute query.
| string | $sql | |
| string | $resName |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
| CDBConnection::execute_multiQueries | ( | $sql = '', |
|
$resName = 'defaultRes' |
|||
| ) |
Execute multiple queries at once.
| string | $sql | |
| string | $resName |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Return id generated by last query.
| string | $resName |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Return next query data line.
| string | $resName |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Return next query data line with numeric indexes.
| string | $resName |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Return latest query error.
| string | $resName |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Return latest query affected rows.
| string | $resName |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Return latest query field count.
| string | $resName |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Return latest query field type.
| integer | $fIndex | |
| string | $resName |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
|
abstract |
Close ressource.
| string | $resName |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
| CDBConnection::escape_string | ( | $string | ) |
Return escaped string.
| string | $string |
Reimplemented in SQLite3DBConnection, PgSQLDBConnection, PDODBConnection, MySQLiDBConnection, and MySQLDBConnection.
| CDBConnection::get_insertExtra | ( | ) |
|
protected |
Return automatic ressource name.
|
protected |
CDBConnection status.
|
protected |
CDBConnection database ressource.
|
protected |
Query ressources.
|
protected |
Name of the database.