aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/firebird.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/db/firebird.php')
-rw-r--r--phpBB/includes/db/firebird.php32
1 files changed, 23 insertions, 9 deletions
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php
index 7072c58ac0..9f9b8a1abd 100644
--- a/phpBB/includes/db/firebird.php
+++ b/phpBB/includes/db/firebird.php
@@ -2,9 +2,8 @@
/**
*
* @package dbal
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -157,7 +156,7 @@ class dbal_firebird extends dbal
}
$this->last_query_text = $query;
- $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->query_result = ($cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
if ($this->query_result === false)
@@ -270,10 +269,10 @@ class dbal_firebird extends dbal
}
}
- if ($cache_ttl && method_exists($cache, 'sql_save'))
+ if ($cache_ttl)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
- $cache->sql_save($query, $this->query_result, $cache_ttl);
+ $this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
}
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{
@@ -333,7 +332,7 @@ class dbal_firebird extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache->sql_exists($query_id))
{
return $cache->sql_fetchrow($query_id);
}
@@ -399,7 +398,7 @@ class dbal_firebird extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache->sql_exists($query_id))
{
return $cache->sql_freeresult($query_id);
}
@@ -450,6 +449,23 @@ class dbal_firebird extends dbal
}
/**
+ * @inheritdoc
+ */
+ function cast_expr_to_bigint($expression)
+ {
+ // Precision must be from 1 to 18
+ return 'CAST(' . $expression . ' as DECIMAL(18, 0))';
+ }
+
+ /**
+ * @inheritdoc
+ */
+ function cast_expr_to_string($expression)
+ {
+ return 'CAST(' . $expression . ' as VARCHAR(255))';
+ }
+
+ /**
* return sql error array
* @access private
*/
@@ -522,5 +538,3 @@ class dbal_firebird extends dbal
}
}
}
-
-?> \ No newline at end of file