Postgre Database connection object.
More...
|
| connect_server ($host='localhost', $login='', $pwd='', $driver='') |
|
| disconnect_server () |
|
| 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 () |
|
| __construct () |
|
| is_connectionActive () |
|
| check_status ($name) |
|
Postgre Database connection object.
Engine / Object Library
- Author
- CaMykS Team camyk.nosp@m.s.co.nosp@m.ntact.nosp@m.@gma.nosp@m.il.co.nosp@m.m
- Version
- 1.0.1
- Date
- Creation: Apr 2018
-
Modification: Sep 2020
- Copyright
- 2014 - 2020 CaMykS Team
- Note
- This program is distributed as is - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- Todo:
- Complete create_database(), dump_database() and get_databaseSummary() methods.
PgSQLDBConnection class.
- Author
- CaMykS Team camyk.nosp@m.s.co.nosp@m.ntact.nosp@m.@gma.nosp@m.il.co.nosp@m.m
◆ connect_server()
PgSQLDBConnection::connect_server |
( |
|
$host = 'localhost' , |
|
|
|
$login = '' , |
|
|
|
$pwd = '' , |
|
|
|
$driver = '' |
|
) |
| |
Connect to server.
- Parameters
-
string | $host | |
string | $login | |
string | $pwd | |
string | $driver | |
- Returns
- boolean success
Reimplemented from CDBConnection.
◆ disconnect_server()
PgSQLDBConnection::disconnect_server |
( |
| ) |
|
Close server connection.
- Returns
- boolean success
Reimplemented from CDBConnection.
◆ get_serverVersion()
PgSQLDBConnection::get_serverVersion |
( |
| ) |
|
Return database engine version.
- Returns
- string
Reimplemented from CDBConnection.
◆ select_database()
PgSQLDBConnection::select_database |
( |
|
$name | ) |
|
Select database.
- Parameters
-
string | $name | the database name |
- Returns
- boolean
Reimplemented from CDBConnection.
◆ create_database()
PgSQLDBConnection::create_database |
( |
|
$name, |
|
|
|
$charset = 'utf8' |
|
) |
| |
Create a database.
- Parameters
-
string | $name | |
string | $charset | |
- Returns
- boolean
- Todo:
- Complete method.
Reimplemented from CDBConnection.
◆ database_exists()
PgSQLDBConnection::database_exists |
( |
|
$name | ) |
|
Check if a base exists.
- Parameters
-
- Returns
- boolean
Reimplemented from CDBConnection.
◆ dump_database()
PgSQLDBConnection::dump_database |
( |
|
$file = false | ) |
|
Dump database.
- Parameters
-
- Returns
- mixed
- Todo:
- Complete method.
Reimplemented from CDBConnection.
◆ get_databaseSize()
PgSQLDBConnection::get_databaseSize |
( |
| ) |
|
Return database size.
- Returns
- integer
Reimplemented from CDBConnection.
◆ get_databaseSummary()
PgSQLDBConnection::get_databaseSummary |
( |
| ) |
|
Return database summary.
- Returns
- array
- Todo:
- Complete method.
Reimplemented from CDBConnection.
◆ get_tableList()
PgSQLDBConnection::get_tableList |
( |
| ) |
|
Return available table list.
- Returns
- array
Reimplemented from CDBConnection.
◆ create_table()
PgSQLDBConnection::create_table |
( |
|
$name, |
|
|
|
$fields, |
|
|
|
$charset = 'utf8' , |
|
|
|
$autoId = true , |
|
|
|
$primaryKeys = array('id') |
|
) |
| |
Create a table in the database
- Parameters
-
string | $name | |
array | $fields | |
string | $charset | |
boolean | $autoId | |
array | $primaryKeys | |
- Returns
- boolean success
Reimplemented from CDBConnection.
◆ execute_query()
PgSQLDBConnection::execute_query |
( |
|
$sql = '' , |
|
|
|
$resName = 'defaultRes' |
|
) |
| |
Execute query.
- Parameters
-
string | $sql | |
string | $resName | |
- Returns
- boolean success
Reimplemented from CDBConnection.
◆ execute_multiQueries()
PgSQLDBConnection::execute_multiQueries |
( |
|
$sql = '' , |
|
|
|
$resName = 'defaultRes' |
|
) |
| |
Execute multiple queries at once.
- Parameters
-
string | $sql | |
string | $resName | |
- Returns
- boolean success
Reimplemented from CDBConnection.
◆ get_queryGeneratedId()
PgSQLDBConnection::get_queryGeneratedId |
( |
|
$resName = 'defaultRes' | ) |
|
Return id generated by last query.
- Parameters
-
- Returns
- integer
Reimplemented from CDBConnection.
◆ get_queryDataLine()
PgSQLDBConnection::get_queryDataLine |
( |
|
$resName = 'defaultRes' | ) |
|
Return next query data line.
- Parameters
-
- Returns
- array
Reimplemented from CDBConnection.
◆ get_queryNumDataLine()
PgSQLDBConnection::get_queryNumDataLine |
( |
|
$resName = 'defaultRes' | ) |
|
Return next query data line with numeric indexes.
- Parameters
-
- Returns
- array
Reimplemented from CDBConnection.
◆ get_queryError()
PgSQLDBConnection::get_queryError |
( |
|
$resName = 'defaultRes' | ) |
|
Return latest query error.
- Parameters
-
- Returns
- string
Reimplemented from CDBConnection.
◆ get_queryAffectedRows()
PgSQLDBConnection::get_queryAffectedRows |
( |
|
$resName = 'defaultRes' | ) |
|
Return latest query affected rows.
- Parameters
-
- Returns
- integer
Reimplemented from CDBConnection.
◆ get_queryFieldCount()
PgSQLDBConnection::get_queryFieldCount |
( |
|
$resName = 'defaultRes' | ) |
|
Return latest query field count.
- Parameters
-
- Returns
- integer
Reimplemented from CDBConnection.
◆ get_queryFieldType()
PgSQLDBConnection::get_queryFieldType |
( |
|
$fIndex = 0 , |
|
|
|
$resName = 'defaultRes' |
|
) |
| |
Return latest query field type.
- Parameters
-
integer | $fIndex | |
string | $resName | |
- Returns
- string
Reimplemented from CDBConnection.
◆ close_ressource()
PgSQLDBConnection::close_ressource |
( |
|
$resName = 'defaultRes' | ) |
|
Close ressource.
- Parameters
-
- Returns
- boolean result
Reimplemented from CDBConnection.
◆ escape_string()
PgSQLDBConnection::escape_string |
( |
|
$string | ) |
|
Return escaped string.
- Parameters
-
- Returns
- string
Reimplemented from CDBConnection.
◆ get_insertExtra()
PgSQLDBConnection::get_insertExtra |
( |
| ) |
|
Return specific insert extra from driver.
- Returns
- string
Reimplemented from CDBConnection.
◆ replace_quotes()
PgSQLDBConnection::replace_quotes |
( |
|
$sql = '' | ) |
|
|
private |
Replace quotes.
- Parameters
-
- Returns
- string
◆ convert_query()
PgSQLDBConnection::convert_query |
( |
|
$sql = '' | ) |
|
|
private |
Convert query from mysql compatible to pgsql database.
- Parameters
-
- Returns
- string
The documentation for this class was generated from the following file: