aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-11-23 14:51:20 -0800
committerfriendica <info@friendica.com>2014-11-23 14:51:20 -0800
commit38aa8204cc6aa36edbe3d4106f718819dc71dc7c (patch)
tree49099f5c74f1ca4b96d7c770eae5e8bc1c1c1f82 /include/dba
parentd191e7c348593d0bd40ac7e5c33bb6b3bb0708bb (diff)
parentbda3346b69f27eb57e391282e1052a52b2baf2ed (diff)
downloadvolse-hubzilla-38aa8204cc6aa36edbe3d4106f718819dc71dc7c.tar.gz
volse-hubzilla-38aa8204cc6aa36edbe3d4106f718819dc71dc7c.tar.bz2
volse-hubzilla-38aa8204cc6aa36edbe3d4106f718819dc71dc7c.zip
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'include/dba')
-rwxr-xr-xinclude/dba/dba_driver.php6
-rwxr-xr-xinclude/dba/dba_mysql.php4
-rwxr-xr-xinclude/dba/dba_mysqli.php4
-rw-r--r--include/dba/dba_postgres.php4
4 files changed, 18 insertions, 0 deletions
diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php
index a62a5e6e2..4a0f5e37b 100755
--- a/include/dba/dba_driver.php
+++ b/include/dba/dba_driver.php
@@ -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))) {
diff --git a/include/dba/dba_mysql.php b/include/dba/dba_mysql.php
index f5a2a47ba..3cadad6dc 100755
--- a/include/dba/dba_mysql.php
+++ b/include/dba/dba_mysql.php
@@ -59,5 +59,9 @@ class dba_mysql extends dba_driver {
mysql_close($this->db);
$this->connected = false;
}
+
+ function getdriver() {
+ return 'mysql';
+ }
}
diff --git a/include/dba/dba_mysqli.php b/include/dba/dba_mysqli.php
index c71f493b0..74a999974 100755
--- a/include/dba/dba_mysqli.php
+++ b/include/dba/dba_mysqli.php
@@ -72,5 +72,9 @@ class dba_mysqli extends dba_driver {
$this->db->close();
$this->connected = false;
}
+
+ function getdriver() {
+ return 'mysqli';
+ }
} \ No newline at end of file
diff --git a/include/dba/dba_postgres.php b/include/dba/dba_postgres.php
index a390292a5..ba4366d13 100644
--- a/include/dba/dba_postgres.php
+++ b/include/dba/dba_postgres.php
@@ -109,4 +109,8 @@ class dba_postgres extends dba_driver {
function concat($fld, $sep) {
return 'string_agg(' . $fld . ',\'' . $sep . '\')';
}
+
+ function getdriver() {
+ return 'pgsql';
+ }
} \ No newline at end of file