sqlite_utility.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. * SQLite Utility Class
  19. *
  20. * @category Database
  21. * @author EllisLab Dev Team
  22. * @link http://codeigniter.com/user_guide/database/
  23. */
  24. class CI_DB_sqlite_utility extends CI_DB_utility {
  25. /**
  26. * List databases
  27. *
  28. * I don't believe you can do a database listing with SQLite
  29. * since each database is its own file. I suppose we could
  30. * try reading a directory looking for SQLite files, but
  31. * that doesn't seem like a terribly good idea
  32. *
  33. * @access private
  34. * @return bool
  35. */
  36. function _list_databases()
  37. {
  38. if ($this->db_debug)
  39. {
  40. return $this->db->display_error('db_unsuported_feature');
  41. }
  42. return array();
  43. }
  44. // --------------------------------------------------------------------
  45. /**
  46. * Optimize table query
  47. *
  48. * Is optimization even supported in SQLite?
  49. *
  50. * @access private
  51. * @param string the table name
  52. * @return object
  53. */
  54. function _optimize_table($table)
  55. {
  56. return FALSE;
  57. }
  58. // --------------------------------------------------------------------
  59. /**
  60. * Repair table query
  61. *
  62. * Are table repairs even supported in SQLite?
  63. *
  64. * @access private
  65. * @param string the table name
  66. * @return object
  67. */
  68. function _repair_table($table)
  69. {
  70. return FALSE;
  71. }
  72. // --------------------------------------------------------------------
  73. /**
  74. * SQLite Export
  75. *
  76. * @access private
  77. * @param array Preferences
  78. * @return mixed
  79. */
  80. function _backup($params = array())
  81. {
  82. // Currently unsupported
  83. return $this->db->display_error('db_unsuported_feature');
  84. }
  85. }
  86. /* End of file sqlite_utility.php */
  87. /* Location: ./system/database/drivers/sqlite/sqlite_utility.php */