Database constructor
Database({
- String? path,
Implementation
Database({this.path}) {
// Install the corpus-lookup hook for FTS5 ranking functions. The
// hook routes through [Database.current] so all live databases
// share a single installation.
fts5CorpusLookup ??= (table, column) {
final db = Database.current;
if (db == null) return null;
try {
return db.fts5IndexFor(table, column);
} catch (_) {
return null;
}
};
}