This commit is contained in:
friendica
2014-11-23 14:51:20 -08:00
13 changed files with 8339 additions and 7393 deletions

View File

@@ -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))) {

View File

@@ -59,5 +59,9 @@ class dba_mysql extends dba_driver {
mysql_close($this->db);
$this->connected = false;
}
function getdriver() {
return 'mysql';
}
}

View File

@@ -72,5 +72,9 @@ class dba_mysqli extends dba_driver {
$this->db->close();
$this->connected = false;
}
function getdriver() {
return 'mysqli';
}
}

View File

@@ -109,4 +109,8 @@ class dba_postgres extends dba_driver {
function concat($fld, $sep) {
return 'string_agg(' . $fld . ',\'' . $sep . '\')';
}
function getdriver() {
return 'pgsql';
}
}