Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 8 |
CRAP | |
0.00% |
0 / 8 |
mssql_base | |
0.00% |
0 / 1 |
|
0.00% |
0 / 8 |
72.00 | |
0.00% |
0 / 8 |
sql_concatenate | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
sql_escape | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
sql_lower_text | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
_sql_like_expression | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
_sql_not_like_expression | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
cast_expr_to_bigint | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
_sql_custom_build | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
sql_quote | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
<?php | |
/** | |
* | |
* This file is part of the phpBB Forum Software package. | |
* | |
* @copyright (c) phpBB Limited <https://www.phpbb.com> | |
* @license GNU General Public License, version 2 (GPL-2.0) | |
* | |
* For full copyright and license information, please see | |
* the docs/CREDITS.txt file. | |
* | |
*/ | |
namespace phpbb\db\driver; | |
/** | |
* MSSQL Database Base Abstraction Layer | |
*/ | |
abstract class mssql_base extends \phpbb\db\driver\driver | |
{ | |
/** | |
* {@inheritDoc} | |
*/ | |
public function sql_concatenate($expr1, $expr2) | |
{ | |
return $expr1 . ' + ' . $expr2; | |
} | |
/** | |
* {@inheritDoc} | |
*/ | |
function sql_escape($msg) | |
{ | |
return str_replace(array("'", "\0"), array("''", ''), $msg); | |
} | |
/** | |
* {@inheritDoc} | |
*/ | |
function sql_lower_text($column_name) | |
{ | |
return "LOWER(SUBSTRING($column_name, 1, DATALENGTH($column_name)))"; | |
} | |
/** | |
* Build LIKE expression | |
* @access private | |
*/ | |
function _sql_like_expression($expression) | |
{ | |
return $expression . " ESCAPE '\\'"; | |
} | |
/** | |
* Build NOT LIKE expression | |
* @access private | |
*/ | |
function _sql_not_like_expression($expression) | |
{ | |
return $expression . " ESCAPE '\\'"; | |
} | |
/** | |
* {@inheritDoc} | |
*/ | |
function cast_expr_to_bigint($expression) | |
{ | |
return 'CONVERT(BIGINT, ' . $expression . ')'; | |
} | |
/** | |
* Build db-specific query data | |
* @access private | |
*/ | |
function _sql_custom_build($stage, $data) | |
{ | |
return $data; | |
} | |
/** | |
* {@inheritDoc} | |
*/ | |
function sql_quote($msg) | |
{ | |
return '"' . $msg . '"'; | |
} | |
} |