summaryrefslogtreecommitdiff
path: root/program/include/rcube_db_sqlsrv.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-07-04 13:11:09 +0200
committerAleksander Machniak <alec@alec.pl>2012-07-04 13:11:09 +0200
commit8c2375a07443231cad32bd4cbd1d9ffbd1aa5087 (patch)
treed7ccfa4c0a24a039b28f7808462465a5d13833de /program/include/rcube_db_sqlsrv.php
parent3e386efeee7cd62fd2b04e3fd2a3b068dd326e0d (diff)
More CS fixes and comments
Diffstat (limited to 'program/include/rcube_db_sqlsrv.php')
-rw-r--r--program/include/rcube_db_sqlsrv.php18
1 files changed, 13 insertions, 5 deletions
diff --git a/program/include/rcube_db_sqlsrv.php b/program/include/rcube_db_sqlsrv.php
index 4ea7e7318..143e02038 100644
--- a/program/include/rcube_db_sqlsrv.php
+++ b/program/include/rcube_db_sqlsrv.php
@@ -31,17 +31,23 @@
*/
class rcube_db_sqlsrv extends rcube_db
{
+ /**
+ * Driver initialization
+ */
protected function init()
{
$this->options['identifier_start'] = '[';
$this->options['identifier_end'] = ']';
}
+ /**
+ * Database character set setting
+ */
protected function set_charset($charset)
{
+ // UTF-8 is default
}
-
/**
* Return SQL function for current time and date
*
@@ -52,7 +58,6 @@ class rcube_db_sqlsrv extends rcube_db
return "getdate()";
}
-
/**
* Return SQL statement to convert a field value into a unix timestamp
*
@@ -69,7 +74,6 @@ class rcube_db_sqlsrv extends rcube_db
return "DATEDIFF(second, '19700101', $field) + DATEDIFF(second, GETDATE(), GETUTCDATE())";
}
-
/**
* Abstract SQL statement for value concatenation
*
@@ -86,10 +90,14 @@ class rcube_db_sqlsrv extends rcube_db
return '(' . join('+', $args) . ')';
}
-
/**
* Adds TOP (LIMIT,OFFSET) clause to the query
*
+ * @param string $query SQL query
+ * @param int $limit Number of rows
+ * @param int $offset Offset
+ *
+ * @return string SQL query
*/
protected function set_limit($query, $limit = 0, $offset = 0)
{
@@ -119,7 +127,7 @@ class rcube_db_sqlsrv extends rcube_db
}
/**
- * Returns PDO DSN string from DSN array (parse_dsn() result)
+ * Returns PDO DSN string from DSN array
*/
protected function dsn_string($dsn)
{