mysqli_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) 2006, 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  * MySQLi Utility Class
00020  *
00021  * @category    Database
00022  * @author              ExpressionEngine Dev Team
00023  * @link                http://codeigniter.com/user_guide/database/
00024  */
00025 class CI_DB_mysqli_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 "SHOW 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 "OPTIMIZE TABLE ".$this->db->_escape_table($table);
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 "REPAIR TABLE ".$this->db->_escape_table($table);
00068         }
00069 
00070         // --------------------------------------------------------------------
00071 
00072         /**
00073          * MySQLi 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          *
00088          * The functions below have been deprecated as of 1.6, and are only here for backwards
00089          * compatibility.  They now reside in dbforge().  The use of dbutils for database manipulation
00090          * is STRONGLY discouraged in favour if using dbforge.
00091          *
00092          */
00093 
00094         /**
00095          * Create database
00096          *
00097          * @access      private
00098          * @param       string  the database name
00099          * @return      bool
00100          */
00101         function _create_database($name)
00102         {
00103                 return "CREATE DATABASE ".$name;
00104         }
00105 
00106         // --------------------------------------------------------------------
00107 
00108         /**
00109          * Drop database
00110          *
00111          * @access      private
00112          * @param       string  the database name
00113          * @return      bool
00114          */
00115         function _drop_database($name)
00116         {
00117                 return "DROP DATABASE ".$name;
00118         }
00119 
00120 }
00121 
00122 /* End of file mysqli_utility.php */
00123 /* Location: ./system/database/drivers/mysqli/mysqli_utility.php */