Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
/**
3
 * PDO MSSQL driver
4
 *
5
 * This file is part of ADOdb, a Database Abstraction Layer library for PHP.
6
 *
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
10
 *
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
17
 *
18
 * @copyright 2000-2013 John Lim
19
 * @copyright 2014 Damien Regad, Mark Newnham and the ADOdb community
20
 */
21
 
22
class ADODB_pdo_mssql extends ADODB_pdo {
23
 
24
	var $hasTop = 'top';
25
	var $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)';
26
	var $sysTimeStamp = 'GetDate()';
27
 
28
 
29
	function _init($parentDriver)
30
	{
31
 
32
		$parentDriver->hasTransactions = false; ## <<< BUG IN PDO mssql driver
33
		$parentDriver->_bindInputArray = false;
34
		$parentDriver->hasInsertID = true;
35
	}
36
 
37
	function ServerInfo()
38
	{
39
		return ADOConnection::ServerInfo();
40
	}
41
 
42
	function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)
43
	{
44
		$ret = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
45
		return $ret;
46
	}
47
 
48
	function SetTransactionMode( $transaction_mode )
49
	{
50
		$this->_transmode  = $transaction_mode;
51
		if (empty($transaction_mode)) {
52
			$this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED');
53
			return;
54
		}
55
		if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
56
		$this->Execute("SET TRANSACTION ".$transaction_mode);
57
	}
58
 
59
	function MetaTables($ttype=false,$showSchema=false,$mask=false)
60
	{
61
		return false;
62
	}
63
 
64
	function MetaColumns($table,$normalize=true)
65
	{
66
		return false;
67
	}
68
 
69
}