Documentation Source Text

Check-in [8885fffc21]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update documentation to note that fts5 contentless and external content tables do not support REPLACE.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8885fffc21dea3f90bf3e076f76acdb730ea6e27
User & Date: dan 2015-10-27 19:18:30.095
Context
2015-10-29
18:16
Bring the formatchng.html document up-to-date. (check-in: afff09ce00 user: drh tags: trunk)
2015-10-27
19:18
Update documentation to note that fts5 contentless and external content tables do not support REPLACE. (check-in: 8885fffc21 user: dan tags: trunk)
17:23
Rework the website menu to add the Purchase link. (check-in: 8ba3eb4736 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/fts5.in.
625
626
627
628
629
630
631


632
633
634
635
636
637
638

<codeblock>
  CREATE VIRTUAL TABLE f1 USING fts5(a, b, c, content='');
</codeblock>

<p> Contentless FTS5 tables do not support UPDATE or DELETE statements, or
INSERT statements that do not supply a non-NULL value for the rowid field.


Rows may be deleted from a contentless table using an [FTS5 delete command].

<p> Attempting to read any column value except the rowid from a contentless
FTS5 table returns an SQL NULL value.

<h3 tags="FTS5 external content tables">External Content Tables</h3>








>
>







625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640

<codeblock>
  CREATE VIRTUAL TABLE f1 USING fts5(a, b, c, content='');
</codeblock>

<p> Contentless FTS5 tables do not support UPDATE or DELETE statements, or
INSERT statements that do not supply a non-NULL value for the rowid field.
Contentless tables do not support REPLACE conflict handling. REPLACE 
and INSERT OR REPLACE statements are treated as regular INSERT statements.
Rows may be deleted from a contentless table using an [FTS5 delete command].

<p> Attempting to read any column value except the rowid from a contentless
FTS5 table returns an SQL NULL value.

<h3 tags="FTS5 external content tables">External Content Tables</h3>

685
686
687
688
689
690
691




692
693
694
695
696
697
698
    INSERT INTO fts_idx(fts_idx, rowid, b, c) VALUES('delete', old.a, old.b, old.c);
  END;
  CREATE TRIGGER tbl_au AFTER UPDATE ON tbl BEGIN
    INSERT INTO fts_idx(fts_idx, rowid, b, c) VALUES('delete', old.a, old.b, old.c);
    INSERT INTO fts_idx(rowid, b, c) VALUES (new.a, new.b, new.c);
  END;
</codeblock>





<h2 tags="FTS5 columnsize option">The Columnsize Option</h2>

<p>Normally, FTS5 maintains a special backing table within the database that
stores the size of each column value in tokens inserted into the main FTS5
table in a separate table. This backing table is used by the
<a href=#xColumnSize>xColumnSize<a> API function, which is in turn used by







>
>
>
>







687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
    INSERT INTO fts_idx(fts_idx, rowid, b, c) VALUES('delete', old.a, old.b, old.c);
  END;
  CREATE TRIGGER tbl_au AFTER UPDATE ON tbl BEGIN
    INSERT INTO fts_idx(fts_idx, rowid, b, c) VALUES('delete', old.a, old.b, old.c);
    INSERT INTO fts_idx(rowid, b, c) VALUES (new.a, new.b, new.c);
  END;
</codeblock>

<p> Like contentless tables, external content tables do not support REPLACE
conflict handling. Any operations that specify REPLACE conflict handling are
handled using ABORT.

<h2 tags="FTS5 columnsize option">The Columnsize Option</h2>

<p>Normally, FTS5 maintains a special backing table within the database that
stores the size of each column value in tokens inserted into the main FTS5
table in a separate table. This backing table is used by the
<a href=#xColumnSize>xColumnSize<a> API function, which is in turn used by