|
NAMEDBD::SQLite::VirtualTable::FileContent -- virtual table for viewing file contentsSYNOPSISWithin Perl :$dbh->sqlite_create_module(fcontent => "DBD::SQLite::VirtualTable::FileContent"); Then, within SQL : CREATE VIRTUAL TABLE tbl USING fcontent( source = src_table, content_col = content, path_col = path, expose = "path, col1, col2, col3", -- or "*" root = "/foo/bar" get_content = Foo::Bar::read_from_file ); SELECT col1, path, content FROM tbl WHERE ...; DESCRIPTIONA "FileContent" virtual table is bound to some underlying source table, which has a column containing paths to files. The virtual table behaves like a database view on the source table, with an added column which exposes the content from those files.This is especially useful as an "external content" to some fulltext table (see DBD::SQLite::Fulltext_search) : the index table stores some metadata about files, and then the fulltext engine can index both the metadata and the file contents. PARAMETERSParameters for creating a "FileContent" virtual table are specified within the "CREATE VIRTUAL TABLE" statement, just like regular column declarations, but with an '=' sign. Authorized parameters are :
AUTHORLaurent Dami <dami@cpan.org>COPYRIGHT AND LICENSECopyright Laurent Dami, 2014.This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |