pdo_utility.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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 2.1.2
  14. * @filesource
  15. */
  16. // ------------------------------------------------------------------------
  17. /**
  18. * PDO Utility Class
  19. *
  20. * @category Database
  21. * @author EllisLab Dev Team
  22. * @link http://codeigniter.com/database/
  23. */
  24. class CI_DB_pdo_utility extends CI_DB_utility {
  25. /**
  26. * List databases
  27. *
  28. * @access private
  29. * @return bool
  30. */
  31. function _list_databases()
  32. {
  33. // Not sure if PDO lets you list all databases...
  34. if ($this->db->db_debug)
  35. {
  36. return $this->db->display_error('db_unsuported_feature');
  37. }
  38. return FALSE;
  39. }
  40. // --------------------------------------------------------------------
  41. /**
  42. * Optimize table query
  43. *
  44. * Generates a platform-specific query so that a table can be optimized
  45. *
  46. * @access private
  47. * @param string the table name
  48. * @return object
  49. */
  50. function _optimize_table($table)
  51. {
  52. // Not a supported PDO feature
  53. if ($this->db->db_debug)
  54. {
  55. return $this->db->display_error('db_unsuported_feature');
  56. }
  57. return FALSE;
  58. }
  59. // --------------------------------------------------------------------
  60. /**
  61. * Repair table query
  62. *
  63. * Generates a platform-specific query so that a table can be repaired
  64. *
  65. * @access private
  66. * @param string the table name
  67. * @return object
  68. */
  69. function _repair_table($table)
  70. {
  71. // Not a supported PDO feature
  72. if ($this->db->db_debug)
  73. {
  74. return $this->db->display_error('db_unsuported_feature');
  75. }
  76. return FALSE;
  77. }
  78. // --------------------------------------------------------------------
  79. /**
  80. * PDO Export
  81. *
  82. * @access private
  83. * @param array Preferences
  84. * @return mixed
  85. */
  86. function _backup($params = array())
  87. {
  88. // Currently unsupported
  89. return $this->db->display_error('db_unsuported_feature');
  90. }
  91. }
  92. /* End of file pdo_utility.php */
  93. /* Location: ./system/database/drivers/pdo/pdo_utility.php */