Merge https://github.com/friendica/red into pending_merge
This commit is contained in:
@@ -104,6 +104,12 @@ abstract class dba_driver {
|
||||
*/
|
||||
abstract function close();
|
||||
|
||||
/**
|
||||
* @brief Return text name for db driver
|
||||
*
|
||||
* This abstract function needs to be implemented in the real driver.
|
||||
*/
|
||||
abstract function getdriver();
|
||||
|
||||
function __construct($server, $port, $user,$pass,$db,$install = false) {
|
||||
if(($install) && (! $this->install($server, $port, $user, $pass, $db))) {
|
||||
|
||||
@@ -59,5 +59,9 @@ class dba_mysql extends dba_driver {
|
||||
mysql_close($this->db);
|
||||
$this->connected = false;
|
||||
}
|
||||
|
||||
function getdriver() {
|
||||
return 'mysql';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -72,5 +72,9 @@ class dba_mysqli extends dba_driver {
|
||||
$this->db->close();
|
||||
$this->connected = false;
|
||||
}
|
||||
|
||||
function getdriver() {
|
||||
return 'mysqli';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -109,4 +109,8 @@ class dba_postgres extends dba_driver {
|
||||
function concat($fld, $sep) {
|
||||
return 'string_agg(' . $fld . ',\'' . $sep . '\')';
|
||||
}
|
||||
|
||||
function getdriver() {
|
||||
return 'pgsql';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user