*** DRAFT ***

SQLite Requirement Matrix Details
lang_createindex.html

Index Summary Markup Original


R-57025-62168-38373-42436-38968-34840-50734-33391 tcl slt th3 src

The CREATE INDEX command consists of the keywords "CREATE INDEX" followed by the name of the new index, the keyword "ON", the name of a previously created table that is to be indexed, and a parenthesized list of table column names and/or expressions that are used for the index key.

th3/req1/createidx01.test:12

/* IMP: R-57025-62168 */
# EVIDENCE-OF: R-57025-62168 The CREATE INDEX command consists of the
# keywords "CREATE INDEX" followed by the name of the new index, the
# keyword "ON", the name of a previously created table that is to be
# indexed, and a parenthesized list of table column names and/or
# expressions that are used for the index key.

R-16085-53730-63732-38499-15956-61706-03515-37986 tcl slt th3 src

If the optional IF NOT EXISTS clause is present and another index with the same name already exists, then this command becomes a no-op.

th3/req1/createidx01.test:158

/* IMP: R-16085-53730 */
# EVIDENCE-OF: R-16085-53730 If the optional IF NOT EXISTS clause is
# present and another index with the same name already exists, then this
# command becomes a no-op.

R-13057-33448-09671-56974-58075-51862-56508-46386 tcl slt th3 src

The number of columns in an index is limited to the value set by sqlite3_limit(SQLITE_LIMIT_COLUMN,...).

th3/req1/createidx03.test:9

/* IMP: R-13057-33448 */
# EVIDENCE-OF: R-13057-33448 The number of columns in an index is
# limited to the value set by sqlite3_limit(SQLITE_LIMIT_COLUMN,...).

R-25613-37547-39472-02780-29297-59051-40019-17427 tcl slt th3 src

Indexes are removed with the DROP INDEX command.

th3/req1/createidx01.test:169

/* IMP: R-25613-37547 */
# EVIDENCE-OF: R-25613-37547 Indexes are removed with the DROP INDEX
# command.

R-06718-34797-20809-29800-16443-15807-57069-06143 tcl slt th3 src

If the UNIQUE keyword appears between CREATE and INDEX then duplicate index entries are not allowed.

th3/req1/createidx01.test:133

/* IMP: R-06718-34797 */
# EVIDENCE-OF: R-06718-34797 If the UNIQUE keyword appears between
# CREATE and INDEX then duplicate index entries are not allowed.

R-17379-32951-58399-57501-33498-60036-41846-10214 tcl slt th3 src

Any attempt to insert a duplicate entry will result in an error.

th3/req1/createidx01.test:136

/* IMP: R-17379-32951 */
# EVIDENCE-OF: R-17379-32951 Any attempt to insert a duplicate entry
# will result in an error.

R-55137-26834-36059-41974-16460-01927-24032-61978 tcl slt th3 src

For the purposes of unique indices, all NULL values are considered different from all other NULL values and are thus unique.

th3/req1/createidx01.test:149

/* IMP: R-55137-26834 */
# EVIDENCE-OF: R-55137-26834 For the purposes of unique indices, all
# NULL values are considered different from all other NULL values and
# are thus unique.

R-11135-63542-29250-48049-02589-36558-61016-54500 tcl slt th3 src

Expressions in an index may not reference other tables and may not use subqueries nor functions whose result might change (ex: random() or sqlite_version()).

/* IMP: R-11135-63542 */
# EVIDENCE-OF: R-11135-63542 Expressions in an index may not reference
# other tables and may not use subqueries nor functions whose result
# might change (ex: random() or sqlite_version()).

R-40025-59984-53912-08799-37788-65154-58103-39921 tcl slt th3 src

Expressions in an index may only refer to columns in the table that is being indexed.

/* IMP: R-40025-59984 */
# EVIDENCE-OF: R-40025-59984 Expressions in an index may only refer to
# columns in the table that is being indexed.

R-32925-06786-44484-40389-19544-51015-10010-30515 tcl slt th3 src

Each column name or expression can be followed by one of the "ASC" or "DESC" keywords to indicate sort order.

th3/req1/createidx02.test:10   th3/req1/createidx02.test:74

/* IMP: R-32925-06786 */
# EVIDENCE-OF: R-32925-06786 Each column name or expression can be
# followed by one of the "ASC" or "DESC" keywords to indicate sort
# order.

R-17151-07205-10894-28299-62821-16887-02117-62221 tcl slt th3 src

The sort order may or may not be ignored depending on the database file format, and in particular the schema format number.

th3/req1/createidx02.test:14

/* IMP: R-17151-07205 */
# EVIDENCE-OF: R-17151-07205 The sort order may or may not be ignored
# depending on the database file format, and in particular the schema
# format number.

R-62804-28221-24652-30727-46370-42129-23035-01106 tcl slt th3 src

The "legacy" schema format (1) ignores index sort order.

th3/req1/createidx02.test:18

/* IMP: R-62804-28221 */
# EVIDENCE-OF: R-62804-28221 The "legacy" schema format (1) ignores
# index sort order.

R-50227-03668-59884-25860-05974-05725-11856-44463 tcl slt th3 src

The descending index schema format (4) takes index sort order into account.

th3/req1/createidx02.test:21

/* IMP: R-50227-03668 */
# EVIDENCE-OF: R-50227-03668 The descending index schema format (4)
# takes index sort order into account.

R-50141-17598-64848-16921-53866-52555-58777-52662 tcl slt th3 src

The legacy_file_format pragma can be used to change set the specific behavior for any version of SQLite.

/* IMP: R-50141-17598 */
# EVIDENCE-OF: R-50141-17598 The legacy_file_format pragma can be used
# to change set the specific behavior for any version of SQLite.

R-48616-47814-10585-42560-43373-45165-03302-15640 tcl slt th3 src

The COLLATE clause optionally following each column name or expression defines a collating sequence used for text entries in that column.

th3/req1/createidx01.test:36

/* IMP: R-48616-47814 */
# EVIDENCE-OF: R-48616-47814 The COLLATE clause optionally following
# each column name or expression defines a collating sequence used for
# text entries in that column.

R-57876-22123-39728-45816-26959-17516-32294-11302 tcl slt th3 src

The default collating sequence is the collating sequence defined for that column in the CREATE TABLE statement.

th3/req1/createidx01.test:40

/* IMP: R-57876-22123 */
# EVIDENCE-OF: R-57876-22123 The default collating sequence is the
# collating sequence defined for that column in the CREATE TABLE
# statement.

R-09773-40602-32968-36782-04559-37578-19507-63398 tcl slt th3 src

Or if no collating sequence is otherwise defined, the built-in BINARY collating sequence is used.

th3/req1/createidx01.test:44

/* IMP: R-09773-40602 */
# EVIDENCE-OF: R-09773-40602 Or if no collating sequence is otherwise
# defined, the built-in BINARY collating sequence is used.