*** DRAFT ***

SQLite Requirement Matrix Details
lang_delete.html

Index Summary Markup Original


R-42542-37790-55254-01774-55006-21389-14649-28118 tcl slt th3 src

Canonical usage: syntax/delete-stmt.html

/* IMP: R-42542-37790 */
# EVIDENCE-OF: R-42542-37790 -- syntax diagram delete-stmt

R-61970-26480-33028-36412-61944-06610-41249-40014 tcl slt th3 src

Canonical usage: syntax/expr.html

/* IMP: R-61970-26480 */
# EVIDENCE-OF: R-61970-26480 -- syntax diagram expr

R-47443-11280-39343-26300-13209-50193-13307-46522 tcl slt th3 src

Canonical usage: syntax/literal-value.html

/* IMP: R-47443-11280 */
# EVIDENCE-OF: R-47443-11280 -- syntax diagram literal-value

R-54197-31877-57350-43471-52348-15226-37714-44266 tcl slt th3 src

Canonical usage: syntax/raise-function.html

/* IMP: R-54197-31877 */
# EVIDENCE-OF: R-54197-31877 -- syntax diagram raise-function

R-19713-52738-52485-51770-14412-64430-18771-01641 tcl slt th3 src

Canonical usage: syntax/select-stmt.html

/* IMP: R-19713-52738 */
# EVIDENCE-OF: R-19713-52738 -- syntax diagram select-stmt

R-29190-16177-49676-56162-41955-57961-52271-56322 tcl slt th3 src

Canonical usage: syntax/common-table-expression.html

/* IMP: R-29190-16177 */
# EVIDENCE-OF: R-29190-16177 -- syntax diagram common-table-expression

R-60687-03927-28728-46307-01187-04245-57381-09290 tcl slt th3 src

Canonical usage: syntax/compound-operator.html

/* IMP: R-60687-03927 */
# EVIDENCE-OF: R-60687-03927 -- syntax diagram compound-operator

R-15218-64377-10732-10708-39996-49168-39639-07301 tcl slt th3 src

Canonical usage: syntax/join-clause.html

/* IMP: R-15218-64377 */
# EVIDENCE-OF: R-15218-64377 -- syntax diagram join-clause

R-59355-25880-50978-14585-20539-54763-44134-61379 tcl slt th3 src

Canonical usage: syntax/join-constraint.html

/* IMP: R-59355-25880 */
# EVIDENCE-OF: R-59355-25880 -- syntax diagram join-constraint

R-24999-30014-65347-53781-01089-16331-37334-22917 tcl slt th3 src

Canonical usage: syntax/join-operator.html

/* IMP: R-24999-30014 */
# EVIDENCE-OF: R-24999-30014 -- syntax diagram join-operator

R-54382-61764-64572-42659-14322-10734-05041-01494 tcl slt th3 src

Canonical usage: syntax/ordering-term.html

/* IMP: R-54382-61764 */
# EVIDENCE-OF: R-54382-61764 -- syntax diagram ordering-term

R-35473-09323-51070-49381-06532-56561-01297-03559 tcl slt th3 src

Canonical usage: syntax/result-column.html

/* IMP: R-35473-09323 */
# EVIDENCE-OF: R-35473-09323 -- syntax diagram result-column

R-45000-47812-33792-18048-40996-50849-16831-13312 tcl slt th3 src

Canonical usage: syntax/table-or-subquery.html

/* IMP: R-45000-47812 */
# EVIDENCE-OF: R-45000-47812 -- syntax diagram table-or-subquery

R-27503-48393-50904-62536-02444-59493-56551-12481 tcl slt th3 src

Canonical usage: syntax/type-name.html

/* IMP: R-27503-48393 */
# EVIDENCE-OF: R-27503-48393 -- syntax diagram type-name

R-16446-38486-52659-45236-06548-25582-51186-33834 tcl slt th3 src

Canonical usage: syntax/signed-number.html

/* IMP: R-16446-38486 */
# EVIDENCE-OF: R-16446-38486 -- syntax diagram signed-number

R-07004-11522-61163-20681-09700-33376-04678-12467 tcl slt th3 src

Canonical usage: syntax/qualified-table-name.html

tcl/indexedby.test:61

/* IMP: R-07004-11522 */
# EVIDENCE-OF: R-07004-11522 -- syntax diagram qualified-table-name

R-08585-09708-58496-08903-08242-48575-40091-19029 tcl slt th3 src

Canonical usage: syntax/with-clause.html

/* IMP: R-08585-09708 */
# EVIDENCE-OF: R-08585-09708 -- syntax diagram with-clause

R-34032-15251-25860-60069-39254-45811-22569-45330 tcl slt th3 src

Canonical usage: syntax/cte-table-name.html

/* IMP: R-34032-15251 */
# EVIDENCE-OF: R-34032-15251 -- syntax diagram cte-table-name

R-19713-52738-52485-51770-14412-64430-18771-01641 tcl slt th3 src

Canonical usage: syntax/select-stmt.html

/* IMP: R-19713-52738 */
# EVIDENCE-OF: R-19713-52738 -- syntax diagram select-stmt

R-29190-16177-49676-56162-41955-57961-52271-56322 tcl slt th3 src

Canonical usage: syntax/common-table-expression.html

/* IMP: R-29190-16177 */
# EVIDENCE-OF: R-29190-16177 -- syntax diagram common-table-expression

R-60687-03927-28728-46307-01187-04245-57381-09290 tcl slt th3 src

Canonical usage: syntax/compound-operator.html

/* IMP: R-60687-03927 */
# EVIDENCE-OF: R-60687-03927 -- syntax diagram compound-operator

R-15218-64377-10732-10708-39996-49168-39639-07301 tcl slt th3 src

Canonical usage: syntax/join-clause.html

/* IMP: R-15218-64377 */
# EVIDENCE-OF: R-15218-64377 -- syntax diagram join-clause

R-59355-25880-50978-14585-20539-54763-44134-61379 tcl slt th3 src

Canonical usage: syntax/join-constraint.html

/* IMP: R-59355-25880 */
# EVIDENCE-OF: R-59355-25880 -- syntax diagram join-constraint

R-24999-30014-65347-53781-01089-16331-37334-22917 tcl slt th3 src

Canonical usage: syntax/join-operator.html

/* IMP: R-24999-30014 */
# EVIDENCE-OF: R-24999-30014 -- syntax diagram join-operator

R-54382-61764-64572-42659-14322-10734-05041-01494 tcl slt th3 src

Canonical usage: syntax/ordering-term.html

/* IMP: R-54382-61764 */
# EVIDENCE-OF: R-54382-61764 -- syntax diagram ordering-term

R-35473-09323-51070-49381-06532-56561-01297-03559 tcl slt th3 src

Canonical usage: syntax/result-column.html

/* IMP: R-35473-09323 */
# EVIDENCE-OF: R-35473-09323 -- syntax diagram result-column

R-45000-47812-33792-18048-40996-50849-16831-13312 tcl slt th3 src

Canonical usage: syntax/table-or-subquery.html

/* IMP: R-45000-47812 */
# EVIDENCE-OF: R-45000-47812 -- syntax diagram table-or-subquery

R-20205-17349-17235-26223-03175-26249-31726-44344 tcl slt th3 src

If the WHERE clause is not present, all records in the table are deleted.

tcl/e_delete.test:50

/* IMP: R-20205-17349 */
# EVIDENCE-OF: R-20205-17349 If the WHERE clause is not present, all
# records in the table are deleted.

R-26300-50198-46822-10316-25756-64179-25231-23016 tcl slt th3 src

If a WHERE clause is supplied, then only those rows for which the WHERE clause boolean expression is true are deleted.

tcl/e_delete.test:73

/* IMP: R-26300-50198 */
# EVIDENCE-OF: R-26300-50198 If a WHERE clause is supplied, then only
# those rows for which the WHERE clause boolean expression is true are
# deleted.

R-23360-48280-32877-53646-44675-29604-63391-63755 tcl slt th3 src

Rows for which the expression is false or NULL are retained.

tcl/e_delete.test:77

/* IMP: R-23360-48280 */
# EVIDENCE-OF: R-23360-48280 Rows for which the expression is false or
# NULL are retained.

R-09681-58560-10305-15727-00297-35868-05335-61175 tcl slt th3 src

The table-name specified as part of a DELETE statement within a trigger body must be unqualified.

tcl/e_delete.test:120

/* IMP: R-09681-58560 */
# EVIDENCE-OF: R-09681-58560 The table-name specified as part of a
# DELETE statement within a trigger body must be unqualified.

R-12275-20298-47772-56757-15778-39462-64033-34126 tcl slt th3 src

In other words, the schema-name. prefix on the table name is not allowed within triggers.

tcl/e_delete.test:123

/* IMP: R-12275-20298 */
# EVIDENCE-OF: R-12275-20298 In other words, the schema-name. prefix on
# the table name is not allowed within triggers.

R-28818-63526-62393-01881-62533-13491-06138-19891 tcl slt th3 src

If the table to which the trigger is attached is not in the temp database, then DELETE statements within the trigger body must operate on tables within the same database as it.

tcl/e_delete.test:148

/* IMP: R-28818-63526 */
# EVIDENCE-OF: R-28818-63526 If the table to which the trigger is
# attached is not in the temp database, then DELETE statements within
# the trigger body must operate on tables within the same database as
# it.

R-31567-38587-20789-38106-63049-52268-08688-06103 tcl slt th3 src

If the table to which the trigger is attached is in the TEMP database, then the unqualified name of the table being deleted is resolved in the same way as it is for a top-level statement (by searching first the TEMP database, then the main database, then any other databases in the order they were attached).

tcl/e_delete.test:206

/* IMP: R-31567-38587 */
# EVIDENCE-OF: R-31567-38587 If the table to which the trigger is
# attached is in the TEMP database, then the unqualified name of the
# table being deleted is resolved in the same way as it is for a
# top-level statement (by searching first the TEMP database, then the
# main database, then any other databases in the order they were
# attached).

R-28691-49464-13455-34259-09637-44341-17028-46530 tcl slt th3 src

The INDEXED BY and NOT INDEXED clauses are not allowed on DELETE statements within triggers.

tcl/e_delete.test:253

/* IMP: R-28691-49464 */
# EVIDENCE-OF: R-28691-49464 The INDEXED BY and NOT INDEXED clauses are
# not allowed on DELETE statements within triggers.

R-64942-06615-59529-33377-22531-50938-02982-04631 tcl slt th3 src

The LIMIT and ORDER BY clauses (described below) are unsupported for DELETE statements within triggers.

tcl/e_delete.test:276

/* IMP: R-64942-06615 */
# EVIDENCE-OF: R-64942-06615 The LIMIT and ORDER BY clauses (described
# below) are unsupported for DELETE statements within triggers.

R-40026-10531-12029-61961-20483-43769-01249-19476 tcl slt th3 src

If SQLite is compiled with the SQLITE_ENABLE_UPDATE_DELETE_LIMIT compile-time option, then the syntax of the DELETE statement is extended by the addition of optional ORDER BY and LIMIT clauses:

tcl/e_delete.test:292

/* IMP: R-40026-10531 */
# EVIDENCE-OF: R-40026-10531 If SQLite is compiled with the
# SQLITE_ENABLE_UPDATE_DELETE_LIMIT compile-time option, then the syntax
# of the DELETE statement is extended by the addition of optional ORDER
# BY and LIMIT clauses:

R-25655-38934-60706-44432-04289-55073-30584-52654 tcl slt th3 src

Canonical usage: syntax/delete-stmt-limited.html

/* IMP: R-25655-38934 */
# EVIDENCE-OF: R-25655-38934 -- syntax diagram delete-stmt-limited

R-44062-08550-47406-04162-18234-03785-06690-48010 tcl slt th3 src

If a DELETE statement has a LIMIT clause, the maximum number of rows that will be deleted is found by evaluating the accompanying expression and casting it to an integer value.

tcl/e_delete.test:327

/* IMP: R-44062-08550 */
# EVIDENCE-OF: R-44062-08550 If a DELETE statement has a LIMIT clause,
# the maximum number of rows that will be deleted is found by evaluating
# the accompanying expression and casting it to an integer value.

R-02661-56399-16863-16765-39256-52589-25619-21380 tcl slt th3 src

If the result of the evaluating the LIMIT clause cannot be losslessly converted to an integer value, it is an error.

tcl/e_delete.test:341

/* IMP: R-02661-56399 */
# EVIDENCE-OF: R-02661-56399 If the result of the evaluating the LIMIT
# clause cannot be losslessly converted to an integer value, it is an
# error.

R-00598-03741-13790-05735-40657-11548-64969-46486 tcl slt th3 src

A negative LIMIT value is interpreted as "no limit".

tcl/e_delete.test:352

/* IMP: R-00598-03741 */
# EVIDENCE-OF: R-00598-03741 A negative LIMIT value is interpreted as
# "no limit".

R-26377-49195-21869-49397-37126-00993-02015-27234 tcl slt th3 src

If the DELETE statement also has an OFFSET clause, then it is similarly evaluated and cast to an integer value. Again, it is an error if the value cannot be losslessly converted to an integer.

tcl/e_delete.test:364

/* IMP: R-26377-49195 */
# EVIDENCE-OF: R-26377-49195 If the DELETE statement also has an OFFSET
# clause, then it is similarly evaluated and cast to an integer value.
# Again, it is an error if the value cannot be losslessly converted to
# an integer.

R-64004-53814-05259-60925-08012-55166-06006-38537 tcl slt th3 src

If there is no OFFSET clause, or the calculated integer value is negative, the effective OFFSET value is zero.

tcl/e_delete.test:381

/* IMP: R-64004-53814 */
# EVIDENCE-OF: R-64004-53814 If there is no OFFSET clause, or the
# calculated integer value is negative, the effective OFFSET value is
# zero.

R-48141-52334-41562-00713-04774-04609-31111-39049 tcl slt th3 src

If the DELETE statement has an ORDER BY clause, then all rows that would be deleted in the absence of the LIMIT clause are sorted according to the ORDER BY. The first M rows, where M is the value found by evaluating the OFFSET clause expression, are skipped, and the following N, where N is the value of the LIMIT expression, are deleted.

tcl/e_delete.test:402

/* IMP: R-48141-52334 */
# EVIDENCE-OF: R-48141-52334 If the DELETE statement has an ORDER BY
# clause, then all rows that would be deleted in the absence of the
# LIMIT clause are sorted according to the ORDER BY. The first M rows,
# where M is the value found by evaluating the OFFSET clause expression,
# are skipped, and the following N, where N is the value of the LIMIT
# expression, are deleted.

R-64535-08414-56299-20863-17793-59913-52096-13773 tcl slt th3 src

If there are less than N rows remaining after taking the OFFSET clause into account, or if the LIMIT clause evaluated to a negative value, then all remaining rows are deleted.

tcl/e_delete.test:419

/* IMP: R-64535-08414 */
# EVIDENCE-OF: R-64535-08414 If there are less than N rows remaining
# after taking the OFFSET clause into account, or if the LIMIT clause
# evaluated to a negative value, then all remaining rows are deleted.

R-37284-06965-27563-13787-56362-60751-57097-13652 tcl slt th3 src

If the DELETE statement has no ORDER BY clause, then all rows that would be deleted in the absence of the LIMIT clause are assembled in an arbitrary order before applying the LIMIT and OFFSET clauses to determine the subset that are actually deleted.

tcl/e_delete.test:431

/* IMP: R-37284-06965 */
# EVIDENCE-OF: R-37284-06965 If the DELETE statement has no ORDER BY
# clause, then all rows that would be deleted in the absence of the
# LIMIT clause are assembled in an arbitrary order before applying the
# LIMIT and OFFSET clauses to determine the subset that are actually
# deleted.

R-07548-13422-51816-60728-36638-61915-61462-20502 tcl slt th3 src

The ORDER BY clause on a DELETE statement is used only to determine which rows fall within the LIMIT. The order in which rows are deleted is arbitrary and is not influenced by the ORDER BY clause.

tcl/e_delete.test:450

/* IMP: R-07548-13422 */
# EVIDENCE-OF: R-07548-13422 The ORDER BY clause on a DELETE statement
# is used only to determine which rows fall within the LIMIT. The order
# in which rows are deleted is arbitrary and is not influenced by the
# ORDER BY clause.

R-39614-35715-21681-03013-09842-54185-10366-26621 tcl slt th3 src

When the WHERE is omitted from a DELETE statement and the table being deleted has no triggers, SQLite uses an optimization to erase the entire table content without having to visit each row of the table individually.

/* IMP: R-39614-35715 */
# EVIDENCE-OF: R-39614-35715 When the WHERE is omitted from a DELETE
# statement and the table being deleted has no triggers, SQLite uses an
# optimization to erase the entire table content without having to visit
# each row of the table individually.

R-64895-14776-45323-12456-17492-01351-20079-09519 tcl slt th3 src

The truncate optimization can be permanently disabled for all queries by recompiling SQLite with the SQLITE_OMIT_TRUNCATE_OPTIMIZATION compile-time switch.

/* IMP: R-64895-14776 */
# EVIDENCE-OF: R-64895-14776 The truncate optimization can be
# permanently disabled for all queries by recompiling SQLite with the
# SQLITE_OMIT_TRUNCATE_OPTIMIZATION compile-time switch.

R-34561-00264-36299-40120-12079-02627-14730-26524 tcl slt th3 src

If an authorizer callback returns SQLITE_IGNORE for an SQLITE_DELETE action code, then the DELETE operation will proceed but the truncate optimization will be bypassed and rows will be deleted one by one.

/* IMP: R-34561-00264 */
# EVIDENCE-OF: R-34561-00264 If an authorizer callback returns
# SQLITE_IGNORE for an SQLITE_DELETE action code, then the DELETE
# operation will proceed but the truncate optimization will be bypassed
# and rows will be deleted one by one.