cubrid_utility.php 2.9 KB

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