cubrid_utility.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2. /**
  3. * CodeIgniter
  4. *
  5. * An open source application development framework for PHP 5.1.6 or newer
  6. *
  7. * @package CodeIgniter
  8. * @author Esen Sagynov
  9. * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
  10. * @license http://codeigniter.com/user_guide/license.html
  11. * @link http://codeigniter.com
  12. * @since Version 1.0
  13. * @filesource
  14. */
  15. // ------------------------------------------------------------------------
  16. /**
  17. * CUBRID Utility Class
  18. *
  19. * @category Database
  20. * @author Esen Sagynov
  21. * @link http://codeigniter.com/user_guide/database/
  22. */
  23. class CI_DB_cubrid_utility extends CI_DB_utility {
  24. /**
  25. * List databases
  26. *
  27. * @access private
  28. * @return array
  29. */
  30. function _list_databases()
  31. {
  32. // CUBRID does not allow to see the list of all databases on the
  33. // server. It is the way its architecture is designed. Every
  34. // database is independent and isolated.
  35. // For this reason we can return only the name of the currect
  36. // connected database.
  37. if ($this->conn_id)
  38. {
  39. return "SELECT '" . $this->database . "'";
  40. }
  41. else
  42. {
  43. return FALSE;
  44. }
  45. }
  46. // --------------------------------------------------------------------
  47. /**
  48. * Optimize table query
  49. *
  50. * Generates a platform-specific query so that a table can be optimized
  51. *
  52. * @access private
  53. * @param string the table name
  54. * @return object
  55. * @link http://www.cubrid.org/manual/840/en/Optimize%20Database
  56. */
  57. function _optimize_table($table)
  58. {
  59. // No SQL based support in CUBRID as of version 8.4.0. Database or
  60. // table optimization can be performed using CUBRID Manager
  61. // database administration tool. See the link above for more info.
  62. return FALSE;
  63. }
  64. // --------------------------------------------------------------------
  65. /**
  66. * Repair table query
  67. *
  68. * Generates a platform-specific query so that a table can be repaired
  69. *
  70. * @access private
  71. * @param string the table name
  72. * @return object
  73. * @link http://www.cubrid.org/manual/840/en/Checking%20Database%20Consistency
  74. */
  75. function _repair_table($table)
  76. {
  77. // Not supported in CUBRID as of version 8.4.0. Database or
  78. // table consistency can be checked using CUBRID Manager
  79. // database administration tool. See the link above for more info.
  80. return FALSE;
  81. }
  82. // --------------------------------------------------------------------
  83. /**
  84. * CUBRID Export
  85. *
  86. * @access private
  87. * @param array Preferences
  88. * @return mixed
  89. */
  90. function _backup($params = array())
  91. {
  92. // No SQL based support in CUBRID as of version 8.4.0. Database or
  93. // table backup can be performed using CUBRID Manager
  94. // database administration tool.
  95. return $this->db->display_error('db_unsuported_feature');
  96. }
  97. }
  98. /* End of file cubrid_utility.php */
  99. /* Location: ./system/database/drivers/cubrid/cubrid_utility.php */