sqlite_utility.php 2.1 KB

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