NAME
DBIO::SQLite::Extension::VirtualTable - Base of the extension classes of SQLite modules that keep shadow tables
VERSION
version 0.900007
DESCRIPTION
The shared rules of DBIO::SQLite::Extension::FTS5 and DBIO::SQLite::Extension::RTree: a module that is used with CREATE VIRTUAL TABLE name USING module(...) and stores itself in tables of the user's schema named after the virtual table. A subclass names the "module" and the "shadow_suffixes"; this class does the rest.
METHODS
module
The module name as it stands after USING. Subclass.
shadow_suffixes
The suffixes of the module's shadow tables, _data for docs_data. Subclass.
inspect
The probe (SQLite has no catalog of extensions, ADR 0066 section 1.3). Reads $ctx->{dbh} and answers
{ module => 'fts5',
available => 1, # 1, 0, or undef when the library cannot say
virtual_tables => [ 'docs', 'notes' ],
shadow_tables => [ 'docs_config', 'docs_content', ... ] }
available is whether the running libsqlite has the module (PRAGMA module_list, libsqlite 3.30+; undef before). virtual_tables are the tables of sqlite_master whose CREATE VIRTUAL TABLE statement uses the module, read with the driver's lexer, so the word in a string or a comment makes none. shadow_tables is what "claims" hands on: the names the module gives the shadow tables of each of them, whether or not this libsqlite makes every one of them (an FTS5 table without a content table has no _content).
claims
[ table => $name ] for each shadow table "inspect" found. The deploy removes them, with their columns, indexes, foreign keys and triggers, from both models ("Claims and their cascade" in DBIO::SQLite::Deploy). The virtual table itself is the application's and stays. Claiming a table the model does not hold -- libsqlite 3.37+ has already kept the shadow tables out of the model (DBIO::SQLite::Introspect::Tables), and the target model has no virtual table at all -- changes nothing.
AUTHOR
DBIO & DBIx::Class Authors
COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.