Documentation Source Text

Check-in [ad981b591f]
Login

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

Overview
Comment:Enhancements to the WITHOUT ROWID virtual table documentation.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ad981b591f2ed231cf1b1337d76ab9ae8f66a9ea
User & Date: drh 2016-06-23 16:59:39
Context
2016-06-23
17:44
Improvements to the DBSTAT and sqlite3_analyzer.exe documentation pages. check-in: 13de82bb23 user: drh tags: trunk
16:59
Enhancements to the WITHOUT ROWID virtual table documentation. check-in: ad981b591f user: drh tags: trunk
2016-06-20
11:12
Additional clarification of the file format. check-in: df46867c0f user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/vtab.in.

511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
than there are hidden columns in the virtual table.

<tcl>hd_fragment worid {WITHOUT ROWID virtual tables}</tcl>
<h3> WITHOUT ROWID Virtual Tables </h3>

<p>Beginning with SQLite [version 3.14.0], the CREATE TABLE statement that
is passed into [sqlite3_declare_vtab()] may contain a [WITHOUT ROWID] clause.
This is useful for cases where the rows of dataset being represented by the 
virtual table cannot easily be mapped into unique integers.  A CREATE TABLE
statement that includes WITHOUT ROWID must define one or more columns a
the PRIMARY KEY.  Every column of the PRIMARY KEY must individually be
NOT NULL and all columns for each row must be collectively unique.

<p>Note that SQLite does not enforce the PRIMARY KEY for a WITHOUT ROWID
virtual table.  Enforcement is the responsibility of the underlying
virtual table implementation.  But SQLite does assume that the PRIMARY KEY
constraint is valid - that the identified columns really are UNIQUE and







|
|
|







511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
than there are hidden columns in the virtual table.

<tcl>hd_fragment worid {WITHOUT ROWID virtual tables}</tcl>
<h3> WITHOUT ROWID Virtual Tables </h3>

<p>Beginning with SQLite [version 3.14.0], the CREATE TABLE statement that
is passed into [sqlite3_declare_vtab()] may contain a [WITHOUT ROWID] clause.
This is useful for cases where the virtual table rows 
cannot easily be mapped into unique integers.  A CREATE TABLE
statement that includes WITHOUT ROWID must define one or more columns as
the PRIMARY KEY.  Every column of the PRIMARY KEY must individually be
NOT NULL and all columns for each row must be collectively unique.

<p>Note that SQLite does not enforce the PRIMARY KEY for a WITHOUT ROWID
virtual table.  Enforcement is the responsibility of the underlying
virtual table implementation.  But SQLite does assume that the PRIMARY KEY
constraint is valid - that the identified columns really are UNIQUE and