comparison test/db_test_base.py @ 6588:91ab3e0ffcd0

Summary: Add test cases for sqlite fts Add support for using the FTS5 full text query engine for sqlite. Also stubbed out some sections for adding postgresql FTS support as well. Added nee indexer type native-fts. It is not selected by default. The indexer=native is used if no indexer is set. This prevents an upgrade from seeming to wipe out the native index if upgraded and indexer=native is not explicitly set. Docs updated. Also changed section headers to sentence case for the current release notes. Indexing backend can control if the full text search phrase is broken into a list of words or passed intact. For backends with query languages (sqlite and can be enabled for whoosh and xapian) we do not want the phrase "tokenized" on whitespace. This also updates the rdbms database version to version 7 to add FTS table. I will be using the same version when I add postgresql. If somebody runs this version on postgresql, they will have to manually add the fts tables for postgresql if they want to use it. Added a new renderError method to client. This allows errors to be reported still using page.html rather than raw html. It also supports templates for any error code. If no template for the error code (e.g. 400) is found, the error in raw html with no page frame is shown. New IndexerQueryError exception to pass back message about query syntax errors.
author John Rouillard <rouilj@ieee.org>
date Sun, 23 Jan 2022 18:57:45 -0500
parents 269f39e28d5c
children 0d99ae7c8de6
comparison
equal deleted inserted replaced
6587:4f8fc55730e1 6588:91ab3e0ffcd0
250 250
251 # load the database 251 # load the database
252 self.db.issue.create(title="flebble frooz") 252 self.db.issue.create(title="flebble frooz")
253 self.db.commit() 253 self.db.commit()
254 254
255 self.assertEqual(self.db.database_schema['version'], 6, 255 if self.db.database_schema['version'] != 6:
256 "This test only runs for database version 6") 256 self.skipTest("This test only runs for database version 6")
257
257 self.db.database_schema['version'] = 5 258 self.db.database_schema['version'] = 5
258 if self.db.dbtype == 'mysql': 259 if self.db.dbtype == 'mysql':
259 # version 6 has 5 indexes 260 # version 6 has 5 indexes
260 self.db.sql('show indexes from _user;') 261 self.db.sql('show indexes from _user;')
261 self.assertEqual(5,len(self.db.cursor.fetchall()), 262 self.assertEqual(5,len(self.db.cursor.fetchall()),

Roundup Issue Tracker: http://roundup-tracker.org/