mssql_utility.php

Go to the documentation of this file.
00001 <?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
00002 /**
00003  * CodeIgniter
00004  *
00005  * An open source application development framework for PHP 4.3.2 or newer
00006  *
00007  * @package             CodeIgniter
00008  * @author              ExpressionEngine Dev Team
00009  * @copyright   Copyright (c) 2008, EllisLab, Inc.
00010  * @license             http://codeigniter.com/user_guide/license.html
00011  * @link                http://codeigniter.com
00012  * @since               Version 1.0
00013  * @filesource
00014  */
00015 
00016 // ------------------------------------------------------------------------
00017 
00018 /**
00019  * MS SQL Utility Class
00020  *
00021  * @category    Database
00022  * @author              ExpressionEngine Dev Team
00023  * @link                http://codeigniter.com/user_guide/database/
00024  */
00025 class CI_DB_mssql_utility extends CI_DB_utility {
00026 
00027         /**
00028          * List databases
00029          *
00030          * @access      private
00031          * @return      bool
00032          */
00033         function _list_databases()
00034         {
00035                 return "EXEC sp_helpdb"; // Can also be: EXEC sp_databases
00036         }
00037 
00038         // --------------------------------------------------------------------
00039 
00040         /**
00041          * Optimize table query
00042          *
00043          * Generates a platform-specific query so that a table can be optimized
00044          *
00045          * @access      private
00046          * @param       string  the table name
00047          * @return      object
00048          */
00049         function _optimize_table($table)
00050         {
00051                 return FALSE; // Is this supported in MS SQL?
00052         }
00053 
00054         // --------------------------------------------------------------------
00055         
00056         /**
00057          * Repair table query
00058          *
00059          * Generates a platform-specific query so that a table can be repaired
00060          *
00061          * @access      private
00062          * @param       string  the table name
00063          * @return      object
00064          */
00065         function _repair_table($table)
00066         {
00067                 return FALSE; // Is this supported in MS SQL?
00068         }
00069 
00070         // --------------------------------------------------------------------
00071 
00072         /**
00073          * MSSQL Export
00074          *
00075          * @access      private
00076          * @param       array   Preferences
00077          * @return      mixed
00078          */
00079         function _backup($params = array())
00080         {
00081                 // Currently unsupported
00082                 return $this->db->display_error('db_unsuported_feature');
00083         }
00084 
00085         /**
00086          *
00087          * The functions below have been deprecated as of 1.6, and are only here for backwards
00088          * compatibility.  They now reside in dbforge().  The use of dbutils for database manipulation
00089          * is STRONGLY discouraged in favour if using dbforge.
00090          *
00091          */
00092 
00093         /**
00094          * Create database
00095          *
00096          * @access      private
00097          * @param       string  the database name
00098          * @return      bool
00099          */
00100         function _create_database($name)
00101         {
00102                 return "CREATE DATABASE ".$name;
00103         }
00104 
00105         // --------------------------------------------------------------------
00106 
00107         /**
00108          * Drop database
00109          *
00110          * @access      private
00111          * @param       string  the database name
00112          * @return      bool
00113          */
00114         function _drop_database($name)
00115         {
00116                 return "DROP DATABASE ".$name;
00117         }
00118 
00119 }
00120 
00121 
00122 /* End of file mssql_utility.php */
00123 /* Location: ./system/database/drivers/mssql/mssql_utility.php */