on-demand release 4.5dev+
[moodle.git] / lib / adodb / drivers / adodb-pdo_mssql.inc.php
blobef63b654ae3b4857ca68cb59308efcba48bae0d4
1 <?php
2 /**
3 * PDO MSSQL driver
5 * This file is part of ADOdb, a Database Abstraction Layer library for PHP.
7 * @package ADOdb
8 * @link https://adodb.org Project's web site and documentation
9 * @link https://github.com/ADOdb/ADOdb Source code and issue tracker
11 * The ADOdb Library is dual-licensed, released under both the BSD 3-Clause
12 * and the GNU Lesser General Public Licence (LGPL) v2.1 or, at your option,
13 * any later version. This means you can use it in proprietary products.
14 * See the LICENSE.md file distributed with this source code for details.
15 * @license BSD-3-Clause
16 * @license LGPL-2.1-or-later
18 * @copyright 2000-2013 John Lim
19 * @copyright 2014 Damien Regad, Mark Newnham and the ADOdb community
22 class ADODB_pdo_mssql extends ADODB_pdo {
24 var $hasTop = 'top';
25 var $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)';
26 var $sysTimeStamp = 'GetDate()';
29 function _init($parentDriver)
32 $parentDriver->hasTransactions = false; ## <<< BUG IN PDO mssql driver
33 $parentDriver->_bindInputArray = false;
34 $parentDriver->hasInsertID = true;
37 function ServerInfo()
39 return ADOConnection::ServerInfo();
42 function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)
44 $ret = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
45 return $ret;
48 function SetTransactionMode( $transaction_mode )
50 $this->_transmode = $transaction_mode;
51 if (empty($transaction_mode)) {
52 $this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED');
53 return;
55 if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
56 $this->Execute("SET TRANSACTION ".$transaction_mode);
59 function MetaTables($ttype=false,$showSchema=false,$mask=false)
61 return false;
64 function MetaColumns($table,$normalize=true)
66 return false;