Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Update the description of the content= option in fts5.html. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
47550c82ded19191779a96e38b0792ea |
User & Date: | dan 2015-04-27 16:42:13.331 |
Context
2015-04-30
| ||
13:26 | Clarifications to howtocompile.html and testing.html. (check-in: 81a7294781 user: drh tags: trunk) | |
2015-04-27
| ||
16:42 | Update the description of the content= option in fts5.html. (check-in: 47550c82de user: dan tags: trunk) | |
2015-04-25
| ||
18:17 | Add discussion of the AFL fuzzer to the testing document. (check-in: 34e2a86993 user: drh tags: trunk) | |
Changes
Changes to pages/fts5.in.
︙ | ︙ | |||
592 593 594 595 596 597 598 | <p> An external content FTS5 table is created by setting the content option to the name of a table, virtual table or view (hereafter the "content table") within the same database. Whenever column values are required by FTS5, it queries the content table as follows, with the rowid of the row for which values are required bound to the SQL variable: <codeblock> | | | > < | > > > | > > > | | | 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 | <p> An external content FTS5 table is created by setting the content option to the name of a table, virtual table or view (hereafter the "content table") within the same database. Whenever column values are required by FTS5, it queries the content table as follows, with the rowid of the row for which values are required bound to the SQL variable: <codeblock> SELECT <content_rowid>, <cols> FROM <content> WHERE <content_rowid> = ?; </codeblock> <p> In the above, <content> is replaced by the name of the content table. By default, <content_rowid> is replaced by the literal text "rowid". Or, if the "content_rowid" option is set within the CREATE VIRTUAL TABLE statement, by the value of that option. <cols> is replaced by a comma-separated list of the FTS5 table column names. For example: <codeblock> <i>-- If the database schema is: </i> CREATE TABLE tbl (a, b, c, d INTEGER PRIMARY KEY); CREATE TABLE fts USING fts5(a, c, content=tbl, content_rowid=d); <i>-- Fts5 may issue queries such as:</i> SELECT d, a, c FROM tbl WHERE d = ?; </codeblock> <p> The content table may also be queried as follows: <codeblock> SELECT <content_rowid>, <cols> FROM <content> ORDER BY <content_rowid> ASC; SELECT <content_rowid>, <cols> FROM <content> ORDER BY <content_rowid> DESC; </codeblock> <p> It is still the responsibility of the user to ensure that the contents of an external content FTS5 table are kept up to date with the content table. One way to do this is with triggers. For example: <codeblock> |
︙ | ︙ |