Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame^] | 1 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 2 | /** |
| 3 | * CodeIgniter |
| 4 | * |
Greg Aker | 741de1c | 2010-11-10 14:52:57 -0600 | [diff] [blame] | 5 | * An open source application development framework for PHP 5.1.6 or newer |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 6 | * |
| 7 | * @package CodeIgniter |
| 8 | * @author ExpressionEngine Dev Team |
Greg Aker | 0711dc8 | 2011-01-05 10:49:40 -0600 | [diff] [blame] | 9 | * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 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 | |
| 18 | /** |
| 19 | * SQLite Utility Class |
| 20 | * |
| 21 | * @category Database |
| 22 | * @author ExpressionEngine Dev Team |
| 23 | * @link http://codeigniter.com/user_guide/database/ |
| 24 | */ |
| 25 | class CI_DB_sqlite_utility extends CI_DB_utility { |
| 26 | |
| 27 | /** |
| 28 | * List databases |
| 29 | * |
| 30 | * I don't believe you can do a database listing with SQLite |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame^] | 31 | * since each database is its own file. I suppose we could |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 32 | * try reading a directory looking for SQLite files, but |
| 33 | * that doesn't seem like a terribly good idea |
| 34 | * |
| 35 | * @access private |
| 36 | * @return bool |
| 37 | */ |
| 38 | function _list_databases() |
| 39 | { |
| 40 | if ($this->db_debug) |
| 41 | { |
Derek Allard | 4860ec5 | 2010-02-04 21:29:03 +0000 | [diff] [blame] | 42 | return $this->db->display_error('db_unsuported_feature'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 43 | } |
| 44 | return array(); |
| 45 | } |
| 46 | |
| 47 | // -------------------------------------------------------------------- |
| 48 | |
| 49 | /** |
| 50 | * Optimize table query |
| 51 | * |
| 52 | * Is optimization even supported in SQLite? |
| 53 | * |
| 54 | * @access private |
| 55 | * @param string the table name |
| 56 | * @return object |
| 57 | */ |
| 58 | function _optimize_table($table) |
| 59 | { |
| 60 | return FALSE; |
| 61 | } |
| 62 | |
| 63 | // -------------------------------------------------------------------- |
| 64 | |
| 65 | /** |
| 66 | * Repair table query |
| 67 | * |
| 68 | * Are table repairs even supported in SQLite? |
| 69 | * |
| 70 | * @access private |
| 71 | * @param string the table name |
| 72 | * @return object |
| 73 | */ |
| 74 | function _repair_table($table) |
| 75 | { |
| 76 | return FALSE; |
| 77 | } |
| 78 | |
| 79 | // -------------------------------------------------------------------- |
| 80 | |
| 81 | /** |
| 82 | * SQLite Export |
| 83 | * |
| 84 | * @access private |
| 85 | * @param array Preferences |
| 86 | * @return mixed |
| 87 | */ |
| 88 | function _backup($params = array()) |
| 89 | { |
| 90 | // Currently unsupported |
| 91 | return $this->db->display_error('db_unsuported_feature'); |
| 92 | } |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | /* End of file sqlite_utility.php */ |
Derek Jones | a3ffbbb | 2008-05-11 18:18:29 +0000 | [diff] [blame] | 96 | /* Location: ./system/database/drivers/sqlite/sqlite_utility.php */ |