mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
Remove View.enable_fts()
The method existed only to raise NotImplementedError, since full-text search is not supported for views, and it showed up in the generated API reference as a documented View method. Calling enable_fts() on a View now raises AttributeError like any other missing method. The sqlite-utils enable-fts command uses db.table() and shows a clean error when pointed at a view instead of a traceback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UnLnhsH25Nnv7LHhekUfPd
This commit is contained in:
parent
70055d7432
commit
adea475a61
5 changed files with 23 additions and 12 deletions
|
|
@ -702,14 +702,14 @@ def enable_fts(
|
|||
_register_db_for_cleanup(db)
|
||||
_load_extensions(db, load_extension)
|
||||
try:
|
||||
db[table].enable_fts(
|
||||
db.table(table).enable_fts(
|
||||
column,
|
||||
fts_version=fts_version,
|
||||
tokenize=tokenize,
|
||||
create_triggers=create_triggers,
|
||||
replace=replace,
|
||||
)
|
||||
except OperationalError as ex:
|
||||
except (NoTable, OperationalError) as ex:
|
||||
raise click.ClickException(str(ex))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue