blob: 9e9dde32e3ad5812cd6490f98d1f3e8e594742ae [file] [log] [blame]
Alex Bilbie84445d02011-03-10 16:43:39 +00001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2/**
3 * CodeIgniter
4 *
Phil Sturgeon07c1ac82012-03-09 17:03:37 +00005 * An open source application development framework for PHP 5.2.4 or newer
Alex Bilbie84445d02011-03-10 16:43:39 +00006 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -05007 * NOTICE OF LICENSE
8 *
9 * Licensed under the Open Software License version 3.0
10 *
11 * This source file is subject to the Open Software License (OSL 3.0) that is
12 * bundled with this package in the files license.txt / license.rst. It is
13 * also available through the world wide web at this URL:
14 * http://opensource.org/licenses/OSL-3.0
15 * If you did not receive a copy of the license and are unable to obtain it
16 * through the world wide web, please send an email to
17 * licensing@ellislab.com so we can send you a copy immediately.
18 *
Alex Bilbie84445d02011-03-10 16:43:39 +000019 * @package CodeIgniter
Derek Jonesf4a4bd82011-10-20 12:18:42 -050020 * @author EllisLab Dev Team
Greg Aker0defe5d2012-01-01 18:46:41 -060021 * @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/)
Derek Jonesf4a4bd82011-10-20 12:18:42 -050022 * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
Alex Bilbie84445d02011-03-10 16:43:39 +000023 * @link http://codeigniter.com
24 * @since Version 1.0
25 * @filesource
26 */
27
28// ------------------------------------------------------------------------
29
30/**
Alex Bilbie01ab0042011-03-18 19:24:30 +000031 * SQLSRV Utility Class
Alex Bilbie84445d02011-03-10 16:43:39 +000032 *
33 * @category Database
Derek Jonesf4a4bd82011-10-20 12:18:42 -050034 * @author EllisLab Dev Team
Alex Bilbie84445d02011-03-10 16:43:39 +000035 * @link http://codeigniter.com/user_guide/database/
36 */
Alex Bilbie01ab0042011-03-18 19:24:30 +000037class CI_DB_sqlsrv_utility extends CI_DB_utility {
Alex Bilbie84445d02011-03-10 16:43:39 +000038
39 /**
40 * List databases
41 *
Alex Bilbie84445d02011-03-10 16:43:39 +000042 * @return bool
43 */
Timothy Warrenb4172692012-03-19 18:34:11 -040044 protected function _list_databases()
Alex Bilbie84445d02011-03-10 16:43:39 +000045 {
46 return "EXEC sp_helpdb"; // Can also be: EXEC sp_databases
47 }
48
49 // --------------------------------------------------------------------
50
51 /**
52 * Optimize table query
53 *
54 * Generates a platform-specific query so that a table can be optimized
55 *
Alex Bilbie84445d02011-03-10 16:43:39 +000056 * @param string the table name
57 * @return object
58 */
Timothy Warrenb4172692012-03-19 18:34:11 -040059 protected function _optimize_table($table)
Alex Bilbie84445d02011-03-10 16:43:39 +000060 {
61 return FALSE; // Is this supported in MS SQL?
62 }
63
64 // --------------------------------------------------------------------
65
66 /**
67 * Repair table query
68 *
69 * Generates a platform-specific query so that a table can be repaired
70 *
Alex Bilbie84445d02011-03-10 16:43:39 +000071 * @param string the table name
72 * @return object
73 */
Timothy Warrenb4172692012-03-19 18:34:11 -040074 protected function _repair_table($table)
Alex Bilbie84445d02011-03-10 16:43:39 +000075 {
76 return FALSE; // Is this supported in MS SQL?
77 }
78
79 // --------------------------------------------------------------------
80
81 /**
82 * MSSQL Export
83 *
Alex Bilbie84445d02011-03-10 16:43:39 +000084 * @param array Preferences
85 * @return mixed
86 */
Timothy Warrenb4172692012-03-19 18:34:11 -040087 protected function _backup($params = array())
Alex Bilbie84445d02011-03-10 16:43:39 +000088 {
89 // Currently unsupported
90 return $this->db->display_error('db_unsuported_feature');
91 }
92
93}
94
95/* End of file mssql_utility.php */
96/* Location: ./system/database/drivers/mssql/mssql_utility.php */