Documentation that should have been checked in along with checkin (614) (CVS 615)

FossilOrigin-Name: 10da13612583caacc6fefe3a1f24187bfae2ebd7
This commit is contained in:
danielk1977 2002-06-11 22:33:47 +00:00
parent 6f34903e85
commit c3d2ac6561
3 changed files with 39 additions and 16 deletions

View File

@ -1,5 +1,5 @@
C Add\sRAISE()\sfunction,\swhich\sallows\smore\sadvanced\sflow-control\sin\strigger\sprograms\s(ticket\s#55)\s(CVS\s614)
D 2002-06-11T02:25:41
C Documentation\sthat\sshould\shave\sbeen\schecked\sin\salong\swith\scheckin\s(614)\s(CVS\s615)
D 2002-06-11T22:33:47
F Makefile.in 6291a33b87d2a395aafd7646ee1ed562c6f2c28c
F Makefile.template 4e11752e0b5c7a043ca50af4296ec562857ba495
F README a4c0ba11354ef6ba0776b400d057c59da47a4cc0
@ -130,14 +130,14 @@ F www/dynload.tcl 02eb8273aa78cfa9070dd4501dca937fb22b466c
F www/faq.tcl 45bdb18b75ac3aa1befec42985fb892413aac0bb
F www/formatchng.tcl 2ce21ff30663fad6618198fe747ce675df577590
F www/index.tcl d0c52fbf031d0a3ee6d9d77aa669d5a4b24b6130
F www/lang.tcl e25a7d383eca7f6a2335ca5b18dcb08a1ccaf6a6
F www/lang.tcl da8057ac23fca9ac1b9207d13382a20c9fee38bb
F www/mingw.tcl f1c7c0a7f53387dd9bb4f8c7e8571b7561510ebc
F www/opcode.tcl bdec8ef9f100dbd87bbef8976c54b88e43fd8ccc
F www/speed.tcl da8afcc1d3ccc5696cfb388a68982bc3d9f7f00f
F www/sqlite.tcl 8b5884354cb615049aed83039f8dfe1552a44279
F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331
F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
P 74d297d97e66452acc5c21048ee8ddf2a90c846f
R 5c5b230772c3601ecd48523835df13e1
P d4a2fb10067203a0d49317db747759872e62927e
R 3f481a8e1da7d6aed1e1b4e78941a484
U danielk1977
Z a3a6e123a401efc55c5086c35a87d954
Z eb43a663e06c37a5acd0560ae3579a9c

View File

@ -1 +1 @@
d4a2fb10067203a0d49317db747759872e62927e
10da13612583caacc6fefe3a1f24187bfae2ebd7

View File

@ -1,7 +1,7 @@
#
# Run this Tcl script to generate the sqlite.html file.
#
set rcsid {$Id: lang.tcl,v 1.38 2002/06/06 23:30:59 drh Exp $}
set rcsid {$Id: lang.tcl,v 1.39 2002/06/11 22:33:47 danielk1977 Exp $}
puts {<html>
<head>
@ -455,14 +455,6 @@ CREATE TRIGGER update_customer_address UPDATE OF address ON customers
puts {
<p>With this trigger installed, executing the statement:</p>
}
puts {
<p>Note that currently, triggers may behave oddly when created on tables
with INTEGER PRIMARY KEY fields. If a BEFORE trigger program modifies the
INTEGER PRIMARY KEY field of a row that will be subsequently updated by the
statement that causes the trigger to fire, then the update may not occur.
The workaround is to declare the table with a PRIMARY KEY column instead
of an INTEGER PRIMARY KEY column.</p>
}
Example {
UPDATE customers SET address = '1 Main St.' WHERE name = 'Jack Jones';
@ -474,6 +466,37 @@ Example {
UPDATE orders SET address = '1 Main St.' WHERE customer_name = 'Jack Jones';
}
puts {
<p>Note that currently, triggers may behave oddly when created on tables
with INTEGER PRIMARY KEY fields. If a BEFORE trigger program modifies the
INTEGER PRIMARY KEY field of a row that will be subsequently updated by the
statement that causes the trigger to fire, then the update may not occur.
The workaround is to declare the table with a PRIMARY KEY column instead
of an INTEGER PRIMARY KEY column.</p>
}
puts {
<p>A special SQL function RAISE() may be used within a trigger-program, with the following syntax</p>
}
Syntax {raise-function} {
RAISE ( ABORT, <error-message> ) |
RAISE ( FAIL, <error-message> ) |
RAISE ( ROLLBACK, <error-message> ) |
RAISE ( IGNORE )
}
puts {
<p>When one of the first three forms is called during trigger-program execution, the specified ON CONFLICT processing is performed (either ABORT, FAIL or
ROLLBACK) and the current query terminates. An error code of SQLITE_CONSTRAINT is returned to the user, along with the specified error message.</p>
<p>When RAISE(IGNORE) is called, the remainder of the current trigger program,
the statement that caused the trigger program to execute and any subsequent
trigger programs that would of been executed are abandoned. No database
changes are rolled back. If the statement that caused the trigger program
to execute is itself part of a trigger program, then that trigger program
resumes execution at the beginning of the next step.
</p>
}
Section {CREATE VIEW} {createview}
Syntax {sql-command} {