Attach = [[ attach database '[v:path]' as [v:name] ]], BeginTransaction = [[ begin transaction ]], EndTransaction = [[ end transaction ]], Rollback = [[ rollback ]], DeleteDocument = [[ delete from [v:partition].document where document.name = %s ]], InsertDocument = [[ insert or ignore into [v:partition].document( name ) values( %s ) ]], CreateText = [[ create virtual table [v:partition].text using fts3 ( content text not null, tokenize porter ) ]], DeleteText = [[ delete from [v:partition].text where text.rowid = ( select document.rowid from [v:partition].document where document.name = %s ) ]], InsertText = [[ insert into [v:partition].text ( rowid, content ) select document.rowid as rowid, %s as content from [v:partition].document where document.name = %s ]], FindDocumentText = [[ insert into hit ( name, extract ) select document.name as name, snippet( text, '', '', '…' ) as extract from [v:partition].text join [v:partition].document on document.rowid = text.rowid where text.content match %s limit %s ]], SelectDocumentText = [[ select document.name as name, text.content as content from [v:partition].document join [v:parition].text on text.rowid = document.rowid where document.name = %s ]], DeleteHit = [[ delete from hit ]], SelectHit = [[ select name, extract from hit order by name limit %s ]]