Documentation Source Text

Check-in [a9594020c6]
Login

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

Overview
Comment:Update RBU documentation to include REPLACE command rows.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:a9594020c6708e2a055a57bc448ca67a8189b9733c2e1dfb26a232123ca6971e
User & Date: dan 2018-10-22 16:07:56
Context
2018-10-24
11:37
Pull in all the changes on the 3.25 branch. check-in: 097d5fec34 user: drh tags: trunk
2018-10-22
16:07
Update RBU documentation to include REPLACE command rows. check-in: a9594020c6 user: dan tags: trunk
2018-09-28
23:43
Initial documentation for the MEMSTAT virtual table. check-in: 6f48ca52cf user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/rbu.in.

196
197
198
199
200
201
202








203
204
205
206
207
208
209
<h3>RBU Database Contents</h3>

<p>For each row to INSERT into the target database as part of the RBU 
update, the corresponding data_% table should contain a single record
with the "rbu_control" column set to contain integer value 0. The
other columns should be set to the values that make up the new record 
to insert. 









<p>If the target database table has an INTEGER PRIMARY KEY, it is not 
possible to insert a NULL value into the IPK column. Attempting to 
do so results in an SQLITE_MISMATCH error.

<p>For each row to DELETE from the target database as part of the RBU 
update, the corresponding data_% table should contain a single record







>
>
>
>
>
>
>
>







196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<h3>RBU Database Contents</h3>

<p>For each row to INSERT into the target database as part of the RBU 
update, the corresponding data_% table should contain a single record
with the "rbu_control" column set to contain integer value 0. The
other columns should be set to the values that make up the new record 
to insert. 

<p>The "rbu_control" column may also be set to integer value 2 for 
an INSERT. In this case, the new row silently replaces any existing row that
has the same primary key values. This is equivalent to a DELETE followed by an
INSERT with the same primary key values. It is not the same as an SQL REPLACE
command, as in that case the new row may replace any conflicting rows (i.e.
those that conflict due to UNIQUE constraints or indexes), not just those with
conflicting primary keys.

<p>If the target database table has an INTEGER PRIMARY KEY, it is not 
possible to insert a NULL value into the IPK column. Attempting to 
do so results in an SQLITE_MISMATCH error.

<p>For each row to DELETE from the target database as part of the RBU 
update, the corresponding data_% table should contain a single record