1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Corrections and updates to the header comment describing the

TriggerStep object.  No changes to code.

FossilOrigin-Name: abb34c0830a49d4f4e277ddd17e710529e87cba7061f3546079dbba2f82b020e
This commit is contained in:
drh
2022-04-06 12:54:41 +00:00
parent 8f1eb6f5e4
commit c16a5686fe
3 changed files with 63 additions and 58 deletions

View File

@@ -1,5 +1,5 @@
C Add\sthe\ssqlite3Show()\sfamily\sof\sdebugging\sinterfaces\sunder\sSQLITE_DEBUG.\nNo\schanges\sto\sdeliverable\sbuilds.\s\sRename\sSQLITE_ENABLE_SELECTTRACE\sto\nSQLITE_ENABLE_TREETRACE\sin\sctime.c. C Corrections\sand\supdates\sto\sthe\sheader\scomment\sdescribing\sthe\nTriggerStep\sobject.\s\sNo\schanges\sto\scode.
D 2022-04-06T12:25:04.844 D 2022-04-06T12:54:41.675
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -557,7 +557,7 @@ F src/shell.c.in 18832612e74c92bbd25d88e1f92685f66589262f68cca1001d2a43bd6dd0ed6
F src/sqlite.h.in 2a35f62185eb5e7ecc64a2f68442b538ce9be74f80f28a00abc24837edcf1c17 F src/sqlite.h.in 2a35f62185eb5e7ecc64a2f68442b538ce9be74f80f28a00abc24837edcf1c17
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h f49e28c25bd941e79794db5415fdf7b202deb3bc072ed6f1ed273d578703684e F src/sqlite3ext.h f49e28c25bd941e79794db5415fdf7b202deb3bc072ed6f1ed273d578703684e
F src/sqliteInt.h 811d8defe1dff439db365e18129216140204462665d19c23be14b78affea3e18 F src/sqliteInt.h 2cd3008975523038cf01ce77d3ec61c190466c5879aa3856fa79c2cb00e5240d
F src/sqliteLimit.h d7323ffea5208c6af2734574bae933ca8ed2ab728083caa117c9738581a31657 F src/sqliteLimit.h d7323ffea5208c6af2734574bae933ca8ed2ab728083caa117c9738581a31657
F src/status.c 4a3da6d77eeb3531cb0dbdf7047772a2a1b99f98c69e90ce009c75fe6328b2c0 F src/status.c 4a3da6d77eeb3531cb0dbdf7047772a2a1b99f98c69e90ce009c75fe6328b2c0
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1 F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
@@ -1945,8 +1945,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 393fa32e188a017f431372b54037cb31e885030542f00d0bfd59da9d9db5c014 P bc33168cf1f48caf848c2dc5c3ae15e4efff8c0378f944eb5398a245139a2b35
R 816f74a7ffe21c8ebedcd180ac5b3970 R 2e653a42f648804346ba4eb540aa80b7
U drh U drh
Z 533350b01dcc82c38ad1e7fcaa045f9f Z 6f432e2a1d80c3ecd80c5f978baed379
# Remove this line to create a well-formed Fossil manifest. # Remove this line to create a well-formed Fossil manifest.

View File

@@ -1 +1 @@
bc33168cf1f48caf848c2dc5c3ae15e4efff8c0378f944eb5398a245139a2b35 abb34c0830a49d4f4e277ddd17e710529e87cba7061f3546079dbba2f82b020e

View File

@@ -3727,19 +3727,19 @@ struct AuthContext {
#define OPFLAG_PREFORMAT 0x80 /* OP_Insert uses preformatted cell */ #define OPFLAG_PREFORMAT 0x80 /* OP_Insert uses preformatted cell */
/* /*
* Each trigger present in the database schema is stored as an instance of ** Each trigger present in the database schema is stored as an instance of
* struct Trigger. ** struct Trigger.
* **
* Pointers to instances of struct Trigger are stored in two ways. ** Pointers to instances of struct Trigger are stored in two ways.
* 1. In the "trigHash" hash table (part of the sqlite3* that represents the ** 1. In the "trigHash" hash table (part of the sqlite3* that represents the
* database). This allows Trigger structures to be retrieved by name. ** database). This allows Trigger structures to be retrieved by name.
* 2. All triggers associated with a single table form a linked list, using the ** 2. All triggers associated with a single table form a linked list, using the
* pNext member of struct Trigger. A pointer to the first element of the ** pNext member of struct Trigger. A pointer to the first element of the
* linked list is stored as the "pTrigger" member of the associated ** linked list is stored as the "pTrigger" member of the associated
* struct Table. ** struct Table.
* **
* The "step_list" member points to the first element of a linked list ** The "step_list" member points to the first element of a linked list
* containing the SQL statements specified as the trigger program. ** containing the SQL statements specified as the trigger program.
*/ */
struct Trigger { struct Trigger {
char *zName; /* The name of the trigger */ char *zName; /* The name of the trigger */
@@ -3767,42 +3767,47 @@ struct Trigger {
#define TRIGGER_AFTER 2 #define TRIGGER_AFTER 2
/* /*
* An instance of struct TriggerStep is used to store a single SQL statement ** An instance of struct TriggerStep is used to store a single SQL statement
* that is a part of a trigger-program. ** that is a part of a trigger-program.
* **
* Instances of struct TriggerStep are stored in a singly linked list (linked ** Instances of struct TriggerStep are stored in a singly linked list (linked
* using the "pNext" member) referenced by the "step_list" member of the ** using the "pNext" member) referenced by the "step_list" member of the
* associated struct Trigger instance. The first element of the linked list is ** associated struct Trigger instance. The first element of the linked list is
* the first step of the trigger-program. ** the first step of the trigger-program.
* **
* The "op" member indicates whether this is a "DELETE", "INSERT", "UPDATE" or ** The "op" member indicates whether this is a "DELETE", "INSERT", "UPDATE" or
* "SELECT" statement. The meanings of the other members is determined by the ** "SELECT" statement. The meanings of the other members is determined by the
* value of "op" as follows: ** value of "op" as follows:
* **
* (op == TK_INSERT) ** (op == TK_INSERT)
* orconf -> stores the ON CONFLICT algorithm ** orconf -> stores the ON CONFLICT algorithm
* pSelect -> If this is an INSERT INTO ... SELECT ... statement, then ** pSelect -> The content to be inserted - either a SELECT statement or
* this stores a pointer to the SELECT statement. Otherwise NULL. ** a VALUES clause.
* zTarget -> Dequoted name of the table to insert into. ** zTarget -> Dequoted name of the table to insert into.
* pExprList -> If this is an INSERT INTO ... VALUES ... statement, then ** pIdList -> If this is an INSERT INTO ... (<column-names>) VALUES ...
* this stores values to be inserted. Otherwise NULL. ** statement, then this stores the column-names to be
* pIdList -> If this is an INSERT INTO ... (<column-names>) VALUES ... ** inserted into.
* statement, then this stores the column-names to be ** pUpsert -> The ON CONFLICT clauses for an Upsert
* inserted into. **
* ** (op == TK_DELETE)
* (op == TK_DELETE) ** zTarget -> Dequoted name of the table to delete from.
* zTarget -> Dequoted name of the table to delete from. ** pWhere -> The WHERE clause of the DELETE statement if one is specified.
* pWhere -> The WHERE clause of the DELETE statement if one is specified. ** Otherwise NULL.
* Otherwise NULL. **
* ** (op == TK_UPDATE)
* (op == TK_UPDATE) ** zTarget -> Dequoted name of the table to update.
* zTarget -> Dequoted name of the table to update. ** pWhere -> The WHERE clause of the UPDATE statement if one is specified.
* pWhere -> The WHERE clause of the UPDATE statement if one is specified. ** Otherwise NULL.
* Otherwise NULL. ** pExprList -> A list of the columns to update and the expressions to update
* pExprList -> A list of the columns to update and the expressions to update ** them to. See sqlite3Update() documentation of "pChanges"
* them to. See sqlite3Update() documentation of "pChanges" ** argument.
* argument. **
* ** (op == TK_SELECT)
** pSelect -> The SELECT statement
**
** (op == TK_RETURNING)
** pExprList -> The list of expressions that follow the RETURNING keyword.
**
*/ */
struct TriggerStep { struct TriggerStep {
u8 op; /* One of TK_DELETE, TK_UPDATE, TK_INSERT, TK_SELECT, u8 op; /* One of TK_DELETE, TK_UPDATE, TK_INSERT, TK_SELECT,