Index: branches/sqlite/includes/db/DatabaseSqlite.php |
— | — | @@ -97,6 +97,20 @@ |
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
| 101 | + * Returns version of currently supported SQLite fulltext search module or false if none present. |
| 102 | + * @return String |
| 103 | + */ |
| 104 | + function fulltextSearchEngine() { |
| 105 | + $table = 'dummy_search_test'; |
| 106 | + $this->query( "DROP TABLE IF EXISTS $table", __METHOD__ ); |
| 107 | + if ( $this->query( "CREATE VIRTUAL TABLE $table USING FTS3(dummy_field)", __METHOD__, true ) ) { |
| 108 | + $this->query( "DROP TABLE IF EXISTS $table", __METHOD__ ); |
| 109 | + return 'FTS3'; |
| 110 | + } |
| 111 | + return false; |
| 112 | + } |
| 113 | + |
| 114 | + /** |
101 | 115 | * SQLite doesn't allow buffered results or data seeking etc, so we'll use fetchAll as the result |
102 | 116 | */ |
103 | 117 | function doQuery( $sql ) { |
— | — | @@ -460,7 +474,7 @@ |
461 | 475 | } |
462 | 476 | |
463 | 477 | public function getSearchEngine() { |
464 | | - return "SearchEngineDummy"; |
| 478 | + return "SearchEngineSqlite"; |
465 | 479 | } |
466 | 480 | |
467 | 481 | /** |